For teachers / Answer key
Answer key: Data Analysis
For teachers. This page is kept out of search engines and linked only from the teachers page. Students can see the same answers in a lesson with Show answer. Any formula that gives the right values counts.
1. Correlation: do two things move together? (Intermediate, 5 min)
In
G2, measure how closely temperature and sales move together:=CORREL(B2:B13, D2:D13)G2=CORREL(B2:B13,D2:D13)
Shows G2: 0.940
Now rain. In
G3, find the correlation between rainfall in column C and cones sold in column D.G3=CORREL(C2:C13,D2:D13)
Shows G3: -0.772
R² is the correlation squared: the share of the ups and downs in sales that temperature explains. In
G4, use=RSQ(D2:D13, B2:B13), or simply squareG2.G4=RSQ(D2:D13,B2:B13)
Shows G4: 88.3%
Label the strength in
G5. A common rule of thumb: 0.7 or more (ignoring the sign) is Strong, 0.4 or more is Moderate, anything less is Weak. UseABSso a strong negative correlation counts too:=IF(ABS(G2)>=0.7, "Strong", IF(ABS(G2)>=0.4, "Moderate", "Weak"))G5=IF(ABS(G2)>=0.7,"Strong",IF(ABS(G2)>=0.4,"Moderate","Weak"))
Shows G5: Strong
2. Linear regression: SLOPE, INTERCEPT and LINEST (Advanced, 8 min)
In
F2, find the slope of the best-fit line:=SLOPE(C2:C13, B2:B13). Sales (y) come first, then ad spend (x).F2=SLOPE(C2:C13,B2:B13)
Shows F2: 4.85
In
F3, find where the line crosses the y axis, the sales you would expect with no advertising:=INTERCEPT(C2:C13, B2:B13)F3=INTERCEPT(C2:C13,B2:B13)
Shows F3: 58.24
How well does the line fit? In
F4, use=RSQ(C2:C13, B2:B13).F4=RSQ(C2:C13,B2:B13)
Shows F4: 0.966
Use the line to predict. The plan is to spend $25k (
F6). InF7, apply intercept + slope × x with the cells you just filled:=F3 + F2*F6F7=F3+F2*F6
Shows F7: 179.4
FORECAST does the same in one step. In
F8, use=FORECAST(F6, C2:C13, B2:B13): the new x, then the known y and x values.F8=FORECAST(F6,C2:C13,B2:B13)
Shows F8: 179.4
Finally, the whole regression table in one formula. In
H2, type=LINEST(C2:C13, B2:B13, TRUE, TRUE). The last TRUE asks for the statistics, and the result spills intoH2:I6.H2=LINEST(C2:C13,B2:B13,TRUE,TRUE)
Shows H2: 4.845, I2: 58.236, H3: 0.287, I3: 4.534, H4: 0.966, I4: 4.997, and 4 more
3. Forecasting a trend with TREND (Advanced, 6 min)
In
D2, fit the trend line through the year:=TREND(C2:C13, A2:A13). Revenue is y, the month number is x, and the result spills down toD13.D2=TREND(C2:C13,A2:A13)
Shows D2: 41.8, D3: 43.9, D4: 46.1, D5: 48.2, D6: 50.3, D7: 52.4, and 6 more
Extend the line into next year. In
D15, add the new month numbers as a third argument:=TREND(C2:C13, A2:A13, A15:A17)D15=TREND(C2:C13,A2:A13,A15:A17)
Shows D15: 67.3, D16: 69.4, D17: 71.6
Which months beat the trend? In
E2, subtract the trend from the actual revenue,=C2-D2, and fill it down toE13. Positive means above the line.E2:E13=C2-D2then copy it across the range
Shows E2: 0.2, E3: 1.1, E4: -2.1, E5: 0.8, E6: 1.7, E7: -2.4, and 6 more
In
H2, count the months that came in above the trend:=COUNTIF(E2:E13, ">0")H2=COUNTIF(E2:E13,">0")
Shows H2: 8
4. Histograms with FREQUENCY (Intermediate, 6 min)
In
F2, count the scores inB2:B31into the bins listed inE2:E6:=FREQUENCY(B2:B31, E2:E6). Five bins give six counts, spilling down toF7.F2=FREQUENCY(B2:B31,E2:E6)
Shows F2: 2, F3: 3, F4: 7, F5: 8, F6: 6, F7: 4
Every score should land in exactly one bin. In
F9, add up the counts with=SUM(F2#). The#means "the whole spilled range starting at F2".F9=SUM(F2#)
Shows F9: 30
In
G2, turn each count into a share of the class:=F2/$F$9, then fill it down toG7. The cells are already formatted as percentages.G2:G7=F2/$F$9then copy it across the range
Shows G2: 7%, G3: 10%, G4: 23%, G5: 27%, G6: 20%, G7: 13%
Now draw it. In
H2, repeat a block character once per student with=REPT("█", F2), and fill it down toH7.H2:H7=REPT("█",F2)then copy it across the range
Shows H2: ██, H3: ███, H4: ███████, H5: ████████, H6: ██████, H7: ████
5. Descriptive statistics: the summary table (Intermediate, 7 min)
Start at the bottom of the table with the basics. Fill in the Count (
E14), Sum (E13), Minimum (E11) and Maximum (E12) of the delivery times inB2:B21.E14=COUNT(B2:B21)E13=SUM(B2:B21)E11=MIN(B2:B21)E12=MAX(B2:B21)
Shows E14: 20, E13: 641, E11: 24, E12: 52
Now the centre. Fill in the Mean (
E2) with AVERAGE, the Median (E4) with MEDIAN and the Mode (E5) with MODE.E2=AVERAGE(B2:B21)E4=MEDIAN(B2:B21)E5=MODE(B2:B21)
Shows E2: 32.05, E4: 30, E5: 30
Next, the spread. Fill in the Standard Deviation (
E6) with STDEV, the Sample Variance (E7) with VAR, and the Range (E10) as the maximum minus the minimum you already have.E6=STDEV(B2:B21)E7=VAR(B2:B21)E10=E12-E11
Shows E6: 6.95, E7: 48.26, E10: 28
The Standard Error says how precisely the 20 orders pin down the true average delivery time. In
E3, divide the standard deviation by the square root of the count:=E6/SQRT(E14)E3=E6/SQRT(E14)
Shows E3: 1.553
Last, the shape. Fill in the Kurtosis (
E8) with KURT and the Skewness (E9) with SKEW.E8=KURT(B2:B21)E9=SKEW(B2:B21)
Shows E8: 2.748, E9: 1.652
6. Moving averages: smoothing out the noise (Intermediate, 5 min)
The first 3-week average is possible in week 3. In
C4, average weeks 1 to 3,=AVERAGE(B2:B4), then fill it down toC17.C4:C17=AVERAGE(B2:B4)then copy it across the range
Shows C4: 1,217, C5: 1,290, C6: 1,340, C7: 1,433, C8: 1,497, C9: 1,513, and 8 more
Now a longer window. In
D7, average the six weeks up to and including week 6,=AVERAGE(B2:B7), and fill it down toD17.D7:D17=AVERAGE(B2:B7)then copy it across the range
Shows D7: 1,325, D8: 1,393, D9: 1,427, D10: 1,527, D11: 1,538, D12: 1,592, and 5 more
In
E4, compare each week with its 3-week average:=IF(B4>C4, "Above", "Below"). Fill it down toE17.E4:E17=IF(B4>C4,"Above","Below")then copy it across the range
Shows E4: Below, E5: Above, E6: Above, E7: Below, E8: Above, E9: Above, and 8 more
The simplest forecast is the latest moving average. In
H2, forecast next week as the average of the last three weeks,B15:B17.H2=AVERAGE(B15:B17)
Shows H2: 1,910