In: Statistics and Probability
Create a random data set consisting of two different samples, drawn from Census data that contains numeric values - such as age. Show details of the sourcing.
State the null and alternate hypothesis in words that apply to the topic you are addressing. Perform a two-sided, two-sample t-test. Explain what you are doing.
Show the graph of the test will all features shown and labeled
State the conclusion of the test and grounds.
The graphs are:
No prescription | Prescription | |
count | 11 | 11 |
mean | 35.7200 | 33.0127 |
sample standard deviation | 2.6415 | 3.6660 |
sample variance | 6.9777 | 13.4394 |
minimum | 29.98 | 28.12 |
maximum | 38.75 | 39.51 |
range | 8.77 | 11.39 |
1st quartile | 34.8650 | 30.2950 |
median | 36.7800 | 31.4500 |
3rd quartile | 37.2100 | 35.9450 |
interquartile range | 2.3450 | 5.6500 |
mode | 37.2100 | #N/A |
low extremes | 0 | 0 |
low outliers | 1 | 0 |
high outliers | 0 | 0 |
high extremes | 0 | 0 |
The independent samples t-test assuming equal variance will be used here.
The hypothesis being tested is:
H0: µ1 = µ2
H1: µ1 ≠ µ2
No prescription | Prescription | |
35.7200 | 33.0127 | mean |
2.6415 | 3.6660 | std. dev. |
11 | 11 | n |
20 | df | |
2.70727 | difference (No prescription - Prescription) | |
10.20857 | pooled variance | |
3.19509 | pooled std. dev. | |
1.36239 | standard error of difference | |
0 | hypothesized difference | |
1.987 | t | |
.0608 | p-value (two-tailed) |
The p-value is 0.0608.
Since the p-value (0.0608) is greater than the significance level (0.05), we fail to reject the null hypothesis.
Therefore, we can conclude that µ1 = µ2.
No prescription | Prescription |
34.5 | 35.75 |
37.21 | 29.75 |
32.25 | 37.23 |
38.24 | 36.14 |
38.75 | 33.54 |
35.23 | 31.27 |
35.65 | 28.12 |
37.21 | 30.84 |
36.78 | 31.45 |
37.12 | 29.54 |
29.98 | 39.51 |