sample_size = random.randint(5,15)
RandomData(groups = 1, n = sample_size).one_sample_t_test()4 One-Sample t-tests
Sample Problems
4.1 About
the one-sample t-Test problems use the RamdomData class which requires:
- the groups variable set to 1:
groups = 1 - an intger for the sample size (e.g.,
n = 30) - a call to the
one_sample_t_test()method
In these sample problems, the per-group sample size is randomly set between 5 and 15. An example funciton call is included below
4.2 Problem 1
Given the following data, is the mean of \(Group_A\) significantly different from \({13}\)? Use a \({2}\) tailed-test with \(\alpha = {0.01}\)
| A |
|---|
| 17 |
| 15 |
| 18 |
| 17 |
| 15 |
| 12 |
| 14 |
| 17 |
| 16 |
| 17 |
| 13 |
| 17 |
| 15 |
| 16 |
| 15 |
The necessary summary statistics for these data
\[M_A = {15.6}\] \[s^2 = {2.83}\] \[n = {15}\]
State the Hypotheses
\[H_0: \mu = 13\] \[H_1: \mu \ne 13\]
The decision criteria:
\(t_{crit} = \pm{2.98}, \alpha_{two-tailed} = {0.01}, df = {14}\)
Calculate the standard error
\[s_M = \sqrt{\frac{s^2}{n}}\]
\[s_M = \sqrt{\frac{2.83}{15}}\]
\[s_M = \sqrt{0.19}\]
\[s_M = {0.44}\]
calculate \(t_{obt}\)
\[t_{obt} = {\frac{M - \mu}{s_M}}\]
\[t_{obt} = \frac{15.6 - 13}{0.44}\]
\[t_{obt} = \frac{2.6}{0.44}\]
\[t_{obt} = {5.91}\]
calculate Cohen’s d
\[d = \frac{M - \mu}{s}\]
\[d = \frac{15.6 - 13}{1.68}\]
\[d = \frac{2.6}{1.68}\]
\[d = {1.55}\]
The results:
reject the null hypothesis, results are significant,
t(14) = 5.91, p < 0.01, d = 1.55
4.3 Problem 2
Given the following data, is the mean of \(Group_A\) significantly different from \({23}\)? Use a \({2}\) tailed-test with \(\alpha = {0.01}\)
| A |
|---|
| 23 |
| 22 |
| 18 |
| 20 |
| 16 |
| 19 |
| 22 |
| 27 |
The necessary summary statistics for these data
\[M_A = {20.88}\] \[s^2 = {11.55}\] \[n = {8}\]
State the Hypotheses
\[H_0: \mu = 23\] \[H_1: \mu \ne 23\]
The decision criteria:
\(t_{crit} = \pm{3.5}, \alpha_{two-tailed} = {0.01}, df = {7}\)
Calculate the standard error
\[s_M = \sqrt{\frac{s^2}{n}}\]
\[s_M = \sqrt{\frac{11.55}{8}}\]
\[s_M = \sqrt{1.44}\]
\[s_M = {1.2}\]
calculate \(t_{obt}\)
\[t_{obt} = {\frac{M - \mu}{s_M}}\]
\[t_{obt} = \frac{20.88 - 23}{1.2}\]
\[t_{obt} = \frac{-2.12}{1.2}\]
\[t_{obt} = {-1.77}\]
calculate Cohen’s d
\[d = \frac{M - \mu}{s}\]
\[d = \frac{20.88 - 23}{3.4}\]
\[d = \frac{-2.12}{3.4}\]
\[d = {-0.62}\]
The results:
fail to reject the null hypothesis, results not significant,
t(7) = -1.77, p > 0.01, d = -0.62
4.4 Problem 3
Given the following data, is the mean of \(Group_A\) significantly different from \({10}\)? Use a \({2}\) tailed-test with \(\alpha = {0.05}\)
| A |
|---|
| 13 |
| 7 |
| 12 |
| 11 |
| 8 |
| 13 |
| 12 |
| 14 |
| 10 |
The necessary summary statistics for these data
\[M_A = {11.11}\] \[s^2 = {5.61}\] \[n = {9}\]
State the Hypotheses
\[H_0: \mu = 10\] \[H_1: \mu \ne 10\]
The decision criteria:
\(t_{crit} = \pm{2.31}, \alpha_{two-tailed} = {0.05}, df = {8}\)
Calculate the standard error
\[s_M = \sqrt{\frac{s^2}{n}}\]
\[s_M = \sqrt{\frac{5.61}{9}}\]
\[s_M = \sqrt{0.62}\]
\[s_M = {0.79}\]
calculate \(t_{obt}\)
\[t_{obt} = {\frac{M - \mu}{s_M}}\]
\[t_{obt} = \frac{11.11 - 10}{0.79}\]
\[t_{obt} = \frac{1.11}{0.79}\]
\[t_{obt} = {1.41}\]
calculate Cohen’s d
\[d = \frac{M - \mu}{s}\]
\[d = \frac{11.11 - 10}{2.37}\]
\[d = \frac{1.11}{2.37}\]
\[d = {0.47}\]
The results:
fail to reject the null hypothesis, results not significant,
t(8) = 1.41, p > 0.05, d = 0.47
4.5 Problem 4
Given the following data, is the mean of \(Group_A\) significantly different from \({32}\)? Use a \({2}\) tailed-test with \(\alpha = {0.05}\)
| A |
|---|
| 35 |
| 24 |
| 43 |
| 22 |
| 23 |
| 36 |
| 25 |
| 36 |
| 26 |
| 28 |
| 22 |
| 29 |
The necessary summary statistics for these data
\[M_A = {29.08}\] \[s^2 = {46.81}\] \[n = {12}\]
State the Hypotheses
\[H_0: \mu = 32\] \[H_1: \mu \ne 32\]
The decision criteria:
\(t_{crit} = \pm{2.2}, \alpha_{two-tailed} = {0.05}, df = {11}\)
Calculate the standard error
\[s_M = \sqrt{\frac{s^2}{n}}\]
\[s_M = \sqrt{\frac{46.81}{12}}\]
\[s_M = \sqrt{3.9}\]
\[s_M = {1.97}\]
calculate \(t_{obt}\)
\[t_{obt} = {\frac{M - \mu}{s_M}}\]
\[t_{obt} = \frac{29.08 - 32}{1.97}\]
\[t_{obt} = \frac{-2.92}{1.97}\]
\[t_{obt} = {-1.48}\]
calculate Cohen’s d
\[d = \frac{M - \mu}{s}\]
\[d = \frac{29.08 - 32}{6.84}\]
\[d = \frac{-2.92}{6.84}\]
\[d = {-0.43}\]
The results:
fail to reject the null hypothesis, results not significant,
t(11) = -1.48, p > 0.05, d = -0.43
4.6 Problem 5
Given the following data, is the mean of \(Group_A\) significantly greater than \({36}\)? Use a \({1}\) tailed-test with \(\alpha = {0.05}\)
| A |
|---|
| 34 |
| 39 |
| 34 |
| 35 |
| 17 |
| 43 |
| 31 |
| 42 |
| 38 |
The necessary summary statistics for these data
\[M_A = {34.78}\] \[s^2 = {59.94}\] \[n = {9}\]
State the Hypotheses
\[H_0: \mu \leq 36\] \[H_1: \mu \gt 36\]
The decision criteria:
\(t_{crit} = +{1.86}, \alpha_{one-tailed} = {0.05}, df = {8}\)
Calculate the standard error
\[s_M = \sqrt{\frac{s^2}{n}}\]
\[s_M = \sqrt{\frac{59.94}{9}}\]
\[s_M = \sqrt{6.66}\]
\[s_M = {2.58}\]
calculate \(t_{obt}\)
\[t_{obt} = {\frac{M - \mu}{s_M}}\]
\[t_{obt} = \frac{34.78 - 36}{2.58}\]
\[t_{obt} = \frac{-1.22}{2.58}\]
\[t_{obt} = {-0.47}\]
calculate Cohen’s d
\[d = \frac{M - \mu}{s}\]
\[d = \frac{34.78 - 36}{7.74}\]
\[d = \frac{-1.22}{7.74}\]
\[d = {-0.16}\]
The results:
fail to reject the null hypothesis, results not significant,
t(8) = -0.47, p > 0.05, d = -0.16