Marks of 12 students are entered in cells A2:A13: 45, 52, 38, 71, 64, 49, 58, 33, 67, 72, 55, 49. Compute the mean, median, mode, geometric mean and harmonic mean.
To compute the different measures of central tendency in MS-Excel using built-in functions.
Applying it:
Blank working table:
| Cell | Formula | Result |
|---|---|---|
| C2 | =AVERAGE(A2:A13) | |
| C3 | =MEDIAN(A2:A13) | |
| C4 | =MODE.SNGL(A2:A13) | |
| C5 | =GEOMEAN(A2:A13) | |
| C6 | =HARMEAN(A2:A13) |
| Cell | Formula | Result |
|---|---|---|
| C2 | =AVERAGE(A2:A13) | 54.42 |
| C3 | =MEDIAN(A2:A13) | 53.5 |
| C4 | =MODE.SNGL(A2:A13) | 49 |
| C5 | =GEOMEAN(A2:A13) | 53.01 |
| C6 | =HARMEAN(A2:A13) | 51.54 |
Mean = 54.42, median = 53.5, mode = 49 (appears twice). As expected AM (54.42) > GM (53.01) > HM (51.54).
Using the same 12 marks (A2:A13), compute the range, sample variance, sample standard deviation, coefficient of variation and the quartiles.
To measure the spread of the data using Excel's dispersion functions.
Applying it:
MAX/MIN for the range, VAR.S/STDEV.S for
sample variance/SD.QUARTILE.INC for Q1 and Q3; IQR = Q3 − Q1.Blank working table:
| Statistic | Formula | Result |
|---|---|---|
| Range | =MAX(A2:A13)-MIN(A2:A13) | |
| Variance (sample) | =VAR.S(A2:A13) | |
| SD (sample) | =STDEV.S(A2:A13) | |
| CV (%) | =STDEV.S(A2:A13)/AVERAGE(A2:A13)*100 | |
| Q1 | =QUARTILE.INC(A2:A13,1) | |
| Q3 | =QUARTILE.INC(A2:A13,3) | |
| IQR | =QUARTILE.INC(A2:A13,3)-QUARTILE.INC(A2:A13,1) |
| Statistic | Formula | Result |
|---|---|---|
| Range | =MAX(A2:A13)-MIN(A2:A13) | 39 |
| Variance (sample) | =VAR.S(A2:A13) | 157.17 |
| SD (sample) | =STDEV.S(A2:A13) | 12.54 |
| CV (%) | =STDEV.S(A2:A13)/AVERAGE(A2:A13)*100 | 23.04 |
| Q1 | =QUARTILE.INC(A2:A13,1) | 48.0 |
| Q3 | =QUARTILE.INC(A2:A13,3) | 64.75 |
| IQR | =QUARTILE.INC(A2:A13,3)-QUARTILE.INC(A2:A13,1) | 16.75 |
The data have range 39, SD 12.54 and CV 23.04 % (moderate relative variability); the middle 50 % of marks span an interquartile range of 16.75 (from 48.0 to 64.75).
For the same 12 marks, compute the skewness and kurtosis and interpret the shape of the distribution.
To measure the asymmetry (skewness) and peakedness (kurtosis) of the data using Excel.
Applying it:
=SKEW(A2:A13) for the (sample) coefficient of skewness.=KURT(A2:A13) for the excess kurtosis (0 for a normal curve).Blank working table:
| Formula | Result | Interpretation |
|---|---|---|
=SKEW(A2:A13) | ||
=KURT(A2:A13) |
| Formula | Result | Interpretation |
|---|---|---|
=SKEW(A2:A13) | −0.14 | slightly negatively skewed (nearly symmetric) |
=KURT(A2:A13) | −0.86 | negative excess ⇒ platykurtic (flatter than normal) |
Skewness = −0.14 (close to 0), so the distribution is nearly symmetric with a very slight left tail; kurtosis = −0.86 (< 0), so it is platykurtic — flatter and broader than a normal curve.
For 10 individuals, Height (cm) is in A2:A11, Weight (kg) in B2:B11 and Age (yrs) in C2:C11. Compute the pairwise correlations and the full correlation matrix.
| Height | 150 | 152 | 155 | 158 | 160 | 163 | 165 | 168 | 170 | 175 |
|---|---|---|---|---|---|---|---|---|---|---|
| Weight | 50 | 52 | 54 | 58 | 59 | 62 | 64 | 67 | 70 | 74 |
| Age | 22 | 25 | 21 | 28 | 24 | 30 | 26 | 27 | 32 | 29 |
To compute Pearson correlation coefficients between pairs of variables and assemble the correlation matrix using the Analysis ToolPak.
Applying it:
=CORREL(range1, range2) for each pair.Blank correlation matrix:
| Height | Weight | Age | |
|---|---|---|---|
| Height | 1 | ||
| Weight | 1 | ||
| Age | 1 |
Pairwise: =CORREL(A2:A11,B2:B11) → 0.998 (Height–Weight);
=CORREL(A2:A11,C2:C11) → 0.735 (Height–Age);
=CORREL(B2:B11,C2:C11) → 0.760 (Weight–Age).
| Height | Weight | Age | |
|---|---|---|---|
| Height | 1 | ||
| Weight | 0.998 | 1 | |
| Age | 0.735 | 0.760 | 1 |
Height and Weight are almost perfectly correlated (0.998); Age is moderately positively correlated with both (0.74 and 0.76). All relationships are positive.
Study hours are in A2:A11 = 2, 3, …, 11 and the corresponding marks in B2:B11 = 50, 55, 62, 66, 72, 75, 80, 85, 90, 95. Fit the regression of marks on hours and predict the marks for 8.5 hours.
To fit a simple linear regression line \(\hat Y = a + bX\), assess its fit \((R^2)\), and forecast.
Applying it:
=SLOPE(B2:B11,A2:A11) and =INTERCEPT(B2:B11,A2:A11) for \(b\) and \(a\).=RSQ(B2:B11,A2:A11) for the coefficient of determination.=FORECAST.LINEAR(8.5,B2:B11,A2:A11) to predict.Blank working table:
| Quantity | Formula | Result |
|---|---|---|
| Slope \(b\) | =SLOPE(B2:B11,A2:A11) | |
| Intercept \(a\) | =INTERCEPT(B2:B11,A2:A11) | |
| \(R^2\) | =RSQ(B2:B11,A2:A11) | |
| Predict at 8.5 | =FORECAST.LINEAR(8.5,B2:B11,A2:A11) |
| Quantity | Formula | Result |
|---|---|---|
| Slope \(b\) | =SLOPE(B2:B11,A2:A11) | 4.909 |
| Intercept \(a\) | =INTERCEPT(B2:B11,A2:A11) | 41.09 |
| \(R^2\) | =RSQ(B2:B11,A2:A11) | 0.997 |
| Predict at 8.5 | =FORECAST.LINEAR(8.5,B2:B11,A2:A11) | 82.82 |
Regression line: \(\hat Y = 41.09 + 4.909\,X\). The ToolPak report gives \(R^2 = 0.997\), \(F \approx 2734\), \(p \approx 0\).
Marks rise by about 4.91 per extra study hour; the model explains 99.7 % of the variation and is highly significant. Predicted marks at 8.5 hours ≈ 82.82.
(a) 100 students have mean IQ 105 with σ = 15; test \(H_0:\mu = 100\). (b) A sample of 9 items has mean 47.5 and sample SD 4; test \(H_0:\mu = 50\) at 5 %. (c) Compare two independent teaching methods by a two-sample t-test: scores under Method A (A2:A11) are 62, 65, 58, 70, 66, 61, 68, 64, 59, 67 and under Method B (B2:B13) are 58, 60, 55, 63, 57, 61, 54, 59, 62, 56, 60, 58.
To carry out one-sample large-sample (Z) and small-sample (t) tests and a two-sample t-test in Excel.
Applying it:
=2*(1-NORM.S.DIST(ABS(Z),TRUE)).=T.DIST.2T(ABS(t),df).=T.TEST(A2:A11,B2:B13,2,2) (2 = two-tailed, 2 = equal variances), or
ToolPak t-Test: Two-Sample Assuming Equal Variances.Blank working table:
| Test | Statistic | Two-tailed p | Decision |
|---|---|---|---|
| One-sample Z | |||
| One-sample t (df = 8) | |||
| Two-sample t (df = 20) |
(a) \(Z = (105-100)/(15/\sqrt{100}) = 5/1.5 = 3.33\); two-tailed \(p = 2(1-\Phi(10/3)) = 0.00086\).
(b) \(t = (47.5-50)/(4/\sqrt 9) = -2.5/1.333 = -1.875\), df = 8;
=T.DIST.2T(1.875,8) = 0.098.
(c) \(\bar x_A = 64.0,\ s_A^2 = 15.56\) (n = 10); \(\bar x_B = 58.58,\ s_B^2 = 7.72\) (n = 12).
=F.TEST(A2:A11,B2:B13) = 0.27, so pooling is reasonable:
\(s_p^2 = (9\times 15.56 + 11\times 7.72)/20 = 11.25\), \(SE = \sqrt{11.25\,(1/10 + 1/12)} = 1.436\),
\(t = 5.417/1.436 = 3.77\), df = 20; =T.TEST(A2:A11,B2:B13,2,2) = 0.0012.
| Test | Statistic | Two-tailed p | Decision |
|---|---|---|---|
| One-sample Z | 3.33 | 0.00086 | Reject \(H_0\) |
| One-sample t (df = 8) | −1.875 | 0.098 | Do not reject \(H_0\) |
| Two-sample t (df = 20) | 3.77 | 0.0012 | Reject \(H_0\) |
(a) \(p = 0.00086 < 0.05\): the mean IQ differs significantly from 100. (b) \(p = 0.098 > 0.05\): the mean is not significantly different from 50. (c) \(p = 0.0012 < 0.05\): Method A's mean score (64.0) is significantly higher than Method B's (58.58).
The weights of 8 patients before (A2:A9) and after (B2:B9) a diet programme are recorded. Test whether the diet significantly reduced weight.
| Before | 72 | 78 | 69 | 80 | 85 | 76 | 82 | 74 |
|---|---|---|---|---|---|---|---|---|
| After | 70 | 76 | 67 | 78 | 83 | 74 | 79 | 72 |
To test the significance of the mean difference in a paired (before–after) design.
Applying it:
=T.TEST(A2:A9,B2:B9,2,1) (2 = two-tailed, 1 = paired), or ToolPak
t-Test: Paired Two Sample for Means.Blank working table:
| Statistic | Value |
|---|---|
| Mean (Before) | |
| Mean (After) | |
| Mean difference \(\bar d\) | |
| \(s_d\) | |
| t Stat (df = 7) | |
| p (two-tail) | |
| t Critical (two-tail) |
Differences \(d\): 2, 2, 2, 2, 2, 2, 3, 2; \(\bar d = 2.125,\; s_d = 0.354\); \(t = 2.125/(0.354/\sqrt 8) = 17.0\).
| Statistic | Value |
|---|---|
| Mean (Before) | 77.000 |
| Mean (After) | 74.875 |
| Mean difference \(\bar d\) | 2.125 |
| \(s_d\) | 0.354 |
| t Stat (df = 7) | 17.0 |
| p (two-tail) | ≈ 6 × 10⁻⁷ |
| t Critical (two-tail) | 2.365 |
\(t = 17.0 > t_{crit} = 2.365\) and \(p \approx 6\times 10^{-7} \ll 0.05\): weight fell significantly over the diet programme (mean loss 2.125 kg); with no control group the test alone cannot attribute the whole loss to the diet.
Bolt diameters from two machines: Machine 1 (\(n_1 = 11\)) has sample variance 25; Machine 2 (\(n_2 = 16\)) has sample variance 16. Test \(H_0:\sigma_1^2 = \sigma_2^2\) at 5 %.
To test the equality of two population variances using the F-test.
Applying it:
=F.INV.RT(0.025, 10, 15) (two-tailed at 5 %).=F.TEST(A2:A12,B2:B17) returns the two-tailed p-value; or
ToolPak F-Test Two-Sample for Variances.Blank working table:
| Quantity | Value |
|---|---|
| \(F = s_1^2/s_2^2\) | |
| df | |
| Critical F (upper 2.5 %) | |
| Decision |
| Quantity | Value |
|---|---|
| \(F = 25/16\) | 1.5625 |
| df | (10, 15) |
Critical F =F.INV.RT(0.025,10,15) | 3.06 |
| Decision | 1.5625 < 3.06 ⇒ Do not reject \(H_0\) |
Since \(F = 1.5625 < F_{crit} = 3.06\), \(H_0\) is not rejected: the data give no evidence that the two machines' variances differ.
A die is rolled 60 times, giving observed frequencies for faces 1–6 of 8, 11, 9, 12, 10, 10. Test whether the die is fair at the 5 % level.
To test the goodness of fit of observed frequencies to the expected (uniform) frequencies using the chi-square test.
Applying it:
=CHISQ.TEST(observed, expected); critical value
=CHISQ.INV.RT(0.05, 5).Blank working table:
| Face | O | E | (O−E)²/E |
|---|---|---|---|
| 1 | 8 | 10 | |
| 2 | 11 | 10 | |
| 3 | 9 | 10 | |
| 4 | 12 | 10 | |
| 5 | 10 | 10 | |
| 6 | 10 | 10 | |
| Σ | 60 | 60 |
| Face | O | E | (O−E)²/E |
|---|---|---|---|
| 1 | 8 | 10 | 0.4 |
| 2 | 11 | 10 | 0.1 |
| 3 | 9 | 10 | 0.1 |
| 4 | 12 | 10 | 0.4 |
| 5 | 10 | 10 | 0 |
| 6 | 10 | 10 | 0 |
| Σ | 60 | 60 | 1.0 |
\(\chi^2 = 1.0\); =CHISQ.TEST(...) → p ≈ 0.96; critical \(\chi^2_{0.05,5} = 11.07\).
\(\chi^2 = 1.0 < 11.07\) (p ≈ 0.96 > 0.05), so \(H_0\) is not rejected: the data give no evidence that the die is unfair.
Yields for 3 fertilizers with 4 plots each are entered in columns A, B, C. Test whether the fertilizers differ (one-way ANOVA); outline the two-way ANOVA options.
| F1 | F2 | F3 |
|---|---|---|
| 22 | 30 | 20 |
| 26 | 34 | 22 |
| 24 | 32 | 24 |
| 28 | 36 | 22 |
To test the equality of several group means using single-factor ANOVA and to identify the two-factor options in Excel.
Applying it:
Blank ANOVA table:
| Source | SS | df | MS | F | p-value | F crit |
|---|---|---|---|---|---|---|
| Between Groups | ||||||
| Within Groups | — | — | — | |||
| Total | — | — | — | — |
| Source | SS | df | MS | F | p-value | F crit |
|---|---|---|---|---|---|---|
| Between Groups | 258.67 | 2 | 129.33 | 24.25 | 0.0002 | 4.26 |
| Within Groups | 48.00 | 9 | 5.33 | — | — | — |
| Total | 306.67 | 11 | — | — | — | — |
Critical difference: \(CD = t_{0.025,9}\sqrt{2(5.33)/4} = 2.262\times 1.633 = 3.69\).
\(F = 24.25 > F_{crit} = 4.26\) (p ≈ 0.0002), so the fertilizers differ significantly. With \(CD = 3.69\), F2 (mean 33) differs from F1 (25) and F3 (22), while F1 and F3 do not differ.