WorldClass Statistics · Inference for numerical data

Difference of two means

this section we consider a difference in two population means, μ1−μ2\mu_1 - \mu_2, under the condition that the data are not paired. Just as with a single sample, we identify conditions to ensure we can use the tt-distribution with a point estimate of the difference, xˉ1−xˉ2\bar{x}_1 - \bar{x}_2, and a new standard error formula. Other than these two differences, the details are almost identical to the one-mean procedures.

We apply these methods in three contexts: determining whether stem cells can improve heart function, exploring the relationship between pregnant womens’ smoking habits and birth weights of newborns, and exploring whether there is statistically significant evidence that one variation of an exam is harder than another variation. This section is motivated by questions like “Is there convincing evidence that newborns from mothers who smoke have a different average birth weight than newborns from mothers who don’t smoke?”

Confidence interval for a difference of means

Does treatment using embryonic stem cells (ESCs) help improve heart function following a heart attack? Figure 7.11 contains summary statistics for an experiment to test ESCs in sheep that had a heart attack. Each of these sheep was randomly assigned to the ESC or control group, and the change in their hearts’ pumping capacity was measured in the study. Figure 7.12 provides histograms of the two data sets. A positive value corresponds to increased pumping capacity, which generally suggests a stronger recovery. Our goal will be to identify a 95% confidence interval for the effect of ESCs on the change in heart pumping capacity relative to the control group.

nn xˉ\bar{x} ss
ESCs 9 3.50 5.17
control 9 -4.33 2.76

Figure 7.11. Summary statistics of the embryonic stem cell study.

The point estimate of the difference in the heart pumping variable is straightforward to find: it is the difference in the sample means. xˉesc−xˉcontrol = 3.50−(−4.33) = 7.83\begin{aligned} \bar{x}_{esc} - \bar{x}_{control}\ =\ 3.50 - (-4.33)\ =\ 7.83 \end{aligned} For the question of whether we can model this difference using a tt-distribution, we’ll need to check new conditions. Like the 2-proportion cases, we will require a more robust version of independence so we are confident the two groups are also independent. Secondly, we also check for normality in each group separately, which in practice is a check for outliers.

Using the t\boldsymbol{t}-distribution for a difference in means

The tt-distribution can be used for inference when working with the standardized difference of two means if

  • Independence, extended. The data are independent within and between the two groups, e.g. the data come from independent random samples or from a randomized experiment.

  • Normality. We check the outliers rules of thumb for each group separately.

The standard error may be computed as SE=σ12n1+σ22n2\begin{aligned} SE= \sqrt{\frac{\sigma_1^2}{n_1} + \frac{\sigma_2^2}{n_2}} \end{aligned} The official formula for the degrees of freedom is quite complex and is generally computed using software, so instead you may use the smaller of n1−1n_1 - 1 and n2−1n_2 - 1 for the degrees of freedom if software isn’t readily available.

Example 7.21

Can the tt-distribution be used to make inference using the point estimate, xˉesc−xˉcontrol=7.83\bar{x}_{esc} - \bar{x}_{control} = 7.83?


First, we check for independence. Because the sheep were randomized into the groups, independence within and between groups is satisfied.

Figure 7.12 does not reveal any clear outliers in either group. (The ESC group does look a bit more variability, but this is not the same as having clear outliers.)

With both conditions met, we can use the tt-distribution to model the difference of sample means.

Two histograms are shown, one for "Embryonic stem cell transplant" and one for "Control (no treatment)". The data for the first histogram for the treatment group are roughly centered at about 3%, with values ranging from about -5% to positive 15%. The data for the second histogram, which represents the control group, is approximately centered at -3%, with values ranging from -10% to about positive 2%.

Figure 7.12. Histograms for both the embryonic stem cell and control group.

As with the one-sample case, we always compute the standard error using sample standard deviations rather than population standard deviations: SE=sesc2nesc+scontrol2ncontrol=5.1729+2.7629=1.95\begin{aligned} SE= \sqrt{\frac{s_{esc}^2}{n_{esc}} + \frac{s_{control}^2}{n_{control}}} = \sqrt{\frac{5.17^2}{9} + \frac{2.76^2}{9}} = 1.95 \end{aligned} Generally, we use statistical software to find the appropriate degrees of freedom, or if software isn’t available, we can use the smaller of n1−1n_1 - 1 and n2−1n_2 - 1 for the degrees of freedom, e.g. if using a tt-table to find tail areas. For transparency in the Examples and Guided Practice, we’ll use the latter approach for finding dfdf; in the case of the ESC example, this means we’ll use df=8df = 8.

Example 7.22

Calculate a 95% confidence interval for the effect of ESCs on the change in heart pumping capacity of sheep after they’ve suffered a heart attack.


We will use the sample difference and the standard error that we computed earlier calculations: xˉesc−xˉcontrol=7.83SE=5.1729+2.7629=1.95\begin{aligned} \bar{x}_{esc} - \bar{x}_{control} = 7.83 && SE = \sqrt{\frac{5.17^2}{9} + \frac{2.76^2}{9}} = 1.95 \end{aligned} Using df=8df = 8, we can identify the critical value of t8⋆=2.31t^{\star}_{8} = 2.31 for a 95% confidence interval. Finally, we can enter the values into the confidence interval formula: point estimate ± t⋆×SE→7.83 ± 2.31×1.95→(3.32,12.34)\begin{aligned} \text{point estimate} \ \pm\ t^{\star} \times SE \quad\rightarrow\quad 7.83 \ \pm\ 2.31\times 1.95 \quad\rightarrow\quad (3.32, 12.34) \end{aligned} We are 95% confident that embryonic stem cells improve the heart’s pumping function in sheep that have suffered a heart attack by 3.32% to 12.34%.

with past statistical inference applications, there is a well-trodden procedure.

Prepare.

Retrieve critical contextual information, and if appropriate, set up hypotheses.

Check.

Ensure the required conditions are reasonably satisfied.

Calculate.

Find the standard error, and then construct a confidence interval, or if conducting a hypothesis test, find a test statistic and p-value.

Conclude.

Interpret the results in the context of the application.

The details change a little from one setting to the next, but this general approach remain the same.

Hypothesis tests for the difference of two means

A data set called ncbirths represents a random sample of 150 cases of mothers and their newborns in North Carolina over a year. Four cases from this data set are represented in Figure 7.13. We are particularly interested in two variables: weight and smoke. The weight variable represents the weights of the newborns and the smoke variable describes which mothers smoked during pregnancy. We would like to know, is there convincing evidence that newborns from mothers who smoke have a different average birth weight than newborns from mothers who don’t smoke? We will use the North Carolina sample to try to answer this question. The smoking group includes 50 cases and the nonsmoking group contains 100 cases.

fage mage weeks weight sex smoke
1 NA 13 37 5.00 female nonsmoker
2 NA 14 36 5.88 female nonsmoker
3 19 15 41 8.13 male smoker
⋮\vdots ⋮\vdots ⋮\vdots ⋮\vdots ⋮\vdots ⋮\vdots
150 45 50 36 9.25 female nonsmoker

Figure 7.13. Four cases from the ncbirths data set. The value “NA”, shown for the first two entries of the first variable, indicates that piece of data is missing.

Example 7.23

Set up appropriate hypotheses to evaluate whether there is a relationship between a mother smoking and average birth weight.


The null hypothesis represents the case of no difference between the groups.

  • There is no difference in average birth weight for newborns from mothers who did and did not smoke. In statistical notation: μn−μs=0\mu_{n} - \mu_{s} = 0, where μn\mu_{n} represents non-smoking mothers and μs\mu_s represents mothers who smoked.

  • There is some difference in average newborn weights from mothers who did and did not smoke (μn−μs≠0\mu_{n} - \mu_{s} \neq 0).

We check the two conditions necessary to model the difference in sample means using the tt-distribution.

  • Because the data come from a simple random sample, the observations are independent, both within and between samples.

  • With both data sets over 30 observations, we inspect the data in Figure 7.14 for any particularly extreme outliers and find none.

Since both conditions are satisfied, the difference in sample means may be modeled using a tt-distribution.

Two histograms are shown for "Newborn Weights, in pounds", one for "Mothers Who Smoked" and one for "Mothers Who Did Not Smoke". The histogram for "Mothers Who Smoked" is centered at about 7 and is left-skewed, with values ranging from about 1 pound to 10 pounds. The histogram for "Mothers Who Did Not Smoke" is centered at about 7.5 and is left-skewed, with values ranging from about 1 pound to 11 pounds.

Figure 7.14. The left panel represents birth weights for infants whose mothers smoked. The right panel represents the birth weights for infants whose mothers who did not smoke.

Guided Practice 7.24

The summary statistics in Figure 7.15 may be useful for this Guided Practice.1

  1. What is the point estimate of the population difference, μn−μs\mu_{n} - \mu_{s}?

  2. Compute the standard error of the point estimate from part (a).

smoker nonsmoker
mean 6.78 7.18
st. dev. 1.43 1.60
samp. size 50 100

Figure 7.15. Summary statistics for the ncbirths data set.

Example 7.25

Complete the hypothesis test started in Example 7.23 and Guided Practice 7.24. Use a significance level of α=0.05\alpha=0.05. For reference, xˉn−xˉs=0.40\bar{x}_{n} - \bar{x}_{s} = 0.40, SE=0.26SE = 0.26, and the sample sizes were nn=100n_n = 100 and ns=50n_s = 50.


We can find the test statistic for this test using the values from Guided Practice 7.24: T= 0.40−0 0.26=1.54\begin{aligned} T = \frac{\ 0.40 - 0\ }{0.26} = 1.54 \end{aligned} The p-value is represented by the two shaded tails in the following plot:

A bell-shaped curve that resembles a normal distribution is shown centered at "mu-sub-n minus mu-sub-s equals 0". The upper tail is shaded above a value marked as "observed difference", and the corresponding lower tail is also shaded. These tails together appear to represent about 10% to 15% of the area under the distribution.

We find the single tail area using software (or the tt-table in Appendix C.2). We’ll use the smaller of nn−1=99n_n - 1 = 99 and ns−1=49n_s - 1 = 49 as the degrees of freedom: df=49df = 49. The one tail area is 0.065; doubling this value gives the two-tail area and p-value, 0.135.

The p-value is larger than the significance value, 0.05, so we do not reject the null hypothesis. There is insufficient evidence to say there is a difference in average birth weight of newborns from North Carolina mothers who did smoke during pregnancy and newborns from North Carolina mothers who did not smoke during pregnancy.

Guided Practice 7.26

We’ve seen much research suggesting smoking is harmful during pregnancy, so how could we fail to reject the null hypothesis in Example 7.25? 2

Guided Practice 7.27

If we made a Type 2 Error and there is a difference, what could we have done differently in data collection to be more likely to detect the difference?3

Public service announcement: while we have used this relatively small data set as an example, larger data sets show that women who smoke tend to have smaller newborns. In fact, some in the tobacco industry actually had the audacity to tout that as a benefit of smoking:

It’s true. The babies born from women who smoke are smaller, but they’re just as healthy as the babies born from women who do not smoke. And some women would prefer having smaller babies.
- Joseph Cullman, Philip Morris’ Chairman of the Board
on CBS’ Face the Nation, Jan 3, 1971

Fact check: the babies from women who smoke are not actually as healthy as the babies from women who do not smoke.4

Case study: two versions of a course exam

An instructor decided to run two slight variations of the same exam. Prior to passing out the exams, she shuffled the exams together to ensure each student received a random version. Summary statistics for how students performed on these two exams are shown in Figure 7.16. Anticipating complaints from students who took Version B, she would like to evaluate whether the difference observed in the groups is so large that it provides convincing evidence that Version B was more difficult (on average) than Version A.

Version nn xˉ\bar{x} ss min max
A 30 79.4 14 45 100
B 27 74.1 20 32 100

Figure 7.16. Summary statistics of scores for each exam version.

Guided Practice 7.28

Construct hypotheses to evaluate whether the observed difference in sample means, xˉA−xˉB=5.3\bar{x}_A - \bar{x}_B=5.3, is due to chance. We will later evaluate these hypotheses using α=0.01\alpha = 0.01.5

Guided Practice 7.29

To evaluate the hypotheses in Guided Practice 7.28 using the tt-distribution, we must first verify conditions.6

  1. Does it seem reasonable that the scores are independent?

  2. Any concerns about outliers?

After verifying the conditions for each sample and confirming the samples are independent of each other, we are ready to conduct the test using the tt-distribution. In this case, we are estimating the true difference in average test scores using the sample data, so the point estimate is xˉA−xˉB=5.3\bar{x}_A - \bar{x}_B = 5.3. The standard error of the estimate can be calculated as SE=sA2nA+sB2nB=14230+20227=4.62\begin{aligned} SE = \sqrt{\frac{s_A^2}{n_A} + \frac{s_B^2}{n_B}} = \sqrt{\frac{14^2}{30} + \frac{20^2}{27}} = 4.62 \end{aligned} Finally, we construct the test statistic: T=point estimate−null valueSE=(79.4−74.1)−04.62=1.15\begin{aligned} T = \frac{\text{point estimate} - \text{null value}}{SE} = \frac{(79.4-74.1) - 0}{4.62} = 1.15 \end{aligned} If we have a computer handy, we can identify the degrees of freedom as 45.97. Otherwise we use the smaller of n1−1n_1-1 and n2−1n_2-1: df=26df=26.

A t-distribution with 26 degrees of freedom is shown along with the p-value from the exam example represented as shaded area. The t-distribution shown is centered at zero, and the upper tail area above T equals 1.15 is shaded along with the area below about -1.15. These shaded tail areas appear to represent roughly 25% of the distribution.

Figure 7.17. The tt-distribution with 26 degrees of freedom and the p-value from exam example represented as the shaded areas.

Example 7.30

Identify the p-value depicted in Figure 7.17 using df=26df = 26, and provide a conclusion in the context of the case study.


Using software, we can find the one-tail area (0.13) and then double this value to get the two-tail area, which is the p-value: 0.26. (Alternatively, we could use the tt-table in Appendix C.2.)

In Guided Practice 7.28, we specified that we would use α=0.01\alpha = 0.01. Since the p-value is larger than α\alpha, we do not reject the null hypothesis. That is, the data do not convincingly show that one exam version is more difficult than the other, and the teacher should not be convinced that she should add points to the Version B exam scores.

Pooled standard deviation estimate (special topic)

Occasionally, two populations will have standard deviations that are so similar that they can be treated as identical. For example, historical data or a well-understood biological mechanism may justify this strong assumption. In such cases, we can make the tt-distribution approach slightly more precise by using a pooled standard deviation.

The pooled standard deviation of two groups is a way to use data from both samples to better estimate the standard deviation and standard error. If s1s_1^{} and s2s_2^{} are the standard deviations of groups 1 and 2 and there are very good reasons to believe that the population standard deviations are equal, then we can obtain an improved estimate of the group variances by pooling their data: spooled2=s12×(n1−1)+s22×(n2−1)n1+n2−2\begin{aligned} s_{pooled}^2 = \frac{s_1^2\times (n_1-1) + s_2^2\times (n_2-1)}{n_1 + n_2 - 2} \end{aligned} where n1n_1 and n2n_2 are the sample sizes, as before. To use this new statistic, we substitute spooled2s_{pooled}^2 in place of s12s_1^2 and s22s_2^2 in the standard error formula, and we use an updated formula for the degrees of freedom: df=n1+n2−2\begin{aligned} df = n_1 + n_2 - 2 \end{aligned}

The benefits of pooling the standard deviation are realized through obtaining a better estimate of the standard deviation for each group and using a larger degrees of freedom parameter for the tt-distribution. Both of these changes may permit a more accurate model of the sampling distribution of xˉ1−xˉ2\bar{x}_1 - \bar{x}_2, if the standard deviations of the two groups are indeed equal.

Pool standard deviations only after careful consideration

A pooled standard deviation is only appropriate when background research indicates the population standard deviations are nearly equal. When the sample size is large and the condition may be adequately checked with data, the benefits of pooling the standard deviations greatly diminishes.

Exercises

Exercise 7.23

Friday the 13th^{\text{th}}, Part I. In the early 1990’s, researchers in the UK collected data on traffic flow, number of shoppers, and traffic accident related emergency room admissions on Friday the 13th^{\text{th}} and the previous Friday, Friday the 6th^{\text{th}}. The histograms below show the distribution of number of cars passing by a specific intersection on Friday the 6th^{\text{th}} and Friday the 13th^{\text{th}} for many such date pairs. Also given are some sample statistics, where the difference is the number of cars on the 6th minus the number of cars on the 13th.7

Three histograms are shown. The first histogram is for "Friday the 6th", which has values ranging from 110,000 to 140,000. The second histogram is for "Friday the 13th", which also has values ranging from 110,000 to 140,000. The third histogram is for "Difference", with values ranging from 0 to 5,000. While the first two distributions are relatively uniform across the range, the last distribution has most of its distribution ranging between 0 and 3,000, with one observation in the 4,000 to 5,000 bin, which represents one value.
 \:

6th^{\text{th}} 13th^{\text{th}} Diff.
xˉ\bar{x} 128,385 126,550 1,835
ss 7,259 7,664 1,176
nn 10 10 10
  1. Are there any underlying structures in these data that should be considered in an analysis? Explain.

  2. What are the hypotheses for evaluating whether the number of people out on Friday the 6th^{\text{th}} is different than the number out on Friday the 13th^{\text{th}}?

  3. Check conditions to carry out the hypothesis test from part (b).

  4. Calculate the test statistic and the p-value.

  5. What is the conclusion of the hypothesis test?

  6. Interpret the p-value in this context.

  7. What type of error might have been made in the conclusion of your test? Explain.

Exercise 7.24

Diamonds, Part I. Prices of diamonds are determined by what is known as the 4 Cs: cut, clarity, color, and carat weight. The prices of diamonds go up as the carat weight increases, but the increase is not smooth. For example, the difference between the size of a 0.99 carat diamond and a 1 carat diamond is undetectable to the naked human eye, but the price of a 1 carat diamond tends to be much higher than the price of a 0.99 diamond. In this question we use two random samples of diamonds, 0.99 carats and 1 carat, each sample of size 23, and compare the average prices of the diamonds. In order to be able to compare equivalent units, we first divide the price for each diamond by 100 times its weight in carats. That is, for a 0.99 carat diamond, we divide the price by 99. For a 1 carat diamond, we divide the price by 100. The distributions and some sample statistics are shown below.8

Conduct a hypothesis test to evaluate if there is a difference between the average standardized prices of 0.99 and 1 carat diamonds. Make sure to state your hypotheses clearly, check relevant conditions, and interpret your results in context of the data.

0.99 carats 1 carat
Mean $44.51 $56.81
SD $13.32 $16.13
n 23 23

Exercise 7.25

Friday the 13th^{\text{th}}, Part II. The Friday the 13th13^{th} study reported in Exercise 7.23 also provides data on traffic accident related emergency room admissions. The distributions of these counts from Friday the 6th^{\text{th}} and Friday the 13th^{\text{th}} are shown below for six such paired dates along with summary statistics. You may assume that conditions for inference are met.

Three histograms are shown. The first histogram is for "Friday the 6th", which has values ranging across 3 to 12. The second histogram is for "Friday the 13th", which has values ranging from 4 to 14. The third histogram is for "Difference", with values ranging from -8 to positive 2.
 \:

6th^{\text{th}} 13th^{\text{th}} diff
Mean 7.5 10.83 -3.33
SD 3.33 3.6 3.01
n 6 6 6
  1. Conduct a hypothesis test to evaluate if there is a difference between the average numbers of traffic accident related emergency room admissions between Friday the 6th^{\text{th}} and Friday the 13th^{\text{th}}.

  2. Calculate a 95% confidence interval for the difference between the average numbers of traffic accident related emergency room admissions between Friday the 6th^{\text{th}} and Friday the 13th^{\text{th}}.

  3. The conclusion of the original study states, “Friday 13th is unlucky for some. The risk of hospital admission as a result of a transport accident may be increased by as much as 52%. Staying at home is recommended.” Do you agree with this statement? Explain your reasoning.

Exercise 7.26

Diamonds, Part II. In Exercise 7.24, we discussed diamond prices (standardized by weight) for diamonds with weights 0. 99 carats and 1 carat. See the table for summary statistics, and then construct a 95% confidence interval for the average difference between the standardized prices of 0.99 and 1 carat diamonds. You may assume the conditions for inference are met.

0.99 carats 1 carat
Mean $44.51 $56.81
SD $13.32 $16.13
n 23 23

Exercise 7.27

Chicken diet and weight, Part I. Chicken farming is a multi-billion dollar industry, and any methods that increase the growth rate of young chicks can reduce consumer costs while increasing company profits, possibly by millions of dollars. An experiment was conducted to measure and compare the effectiveness of various feed supplements on the growth rate of chickens. Newly hatched chicks were randomly allocated into six groups, and each group was given a different feed supplement. Below are some summary statistics from this data set along with box plots showing the distribution of weights by feed type.9

Mean SD n
casein 323.58 64.43 12
horsebean 160.20 38.63 10
linseed 218.75 52.24 12
meatmeal 276.91 64.90 11
soybean 246.43 54.13 14
sunflower 328.92 48.84 12
  1. Describe the distributions of weights of chickens that were fed linseed and horsebean.

  2. Do these data provide strong evidence that the average weights of chickens that were fed linseed and horsebean are different? Use a 5% significance level.

  3. What type of error might we have committed? Explain.

  4. Would your conclusion change if we used α=0.01\alpha = 0.01?

Exercise 7.28

Fuel efficiency of manual and automatic cars, Part I. Each year the US Environmental Protection Agency (EPA) releases fuel economy data on cars manufactured in that year. Below are summary statistics on fuel efficiency (in miles/gallon) from random samples of cars with manual and automatic transmissions. Do these data provide strong evidence of a difference between the average fuel efficiency of cars with manual and automatic transmissions in terms of their average city mileage? Assume that conditions for inference are satisfied. 10

City MPG
Automatic Manual
Mean 16.12 19.85
SD 3.58 4.51
n 26 26

Exercise 7.29

Chicken diet and weight, Part II. Casein is a common weight gain supplement for humans. Does it have an effect on chickens? Using data provided in Exercise 7.27, test the hypothesis that the average weight of chickens that were fed casein is different than the average weight of chickens that were fed soybean. If your hypothesis test yields a statistically significant result, discuss whether or not the higher average weight of chickens can be attributed to the casein diet. Assume that conditions for inference are satisfied.

Exercise 7.30

Fuel efficiency of manual and automatic cars, Part II. The table provides summary statistics on highway fuel economy of the same 52 cars from Exercise 7.28. Use these statistics to calculate a 98% confidence interval for the difference between average highway mileage of manual and automatic cars, and interpret this interval in the context of the data.11

Hwy MPG
Automatic Manual
Mean 22.92 27.88
SD 5.29 5.01
n 26 26

Exercise 7.31

Prison isolation experiment, Part I. Subjects from Central Prison in Raleigh, NC, volunteered for an experiment involving an “isolation” experience. The goal of the experiment was to find a treatment that reduces subjects’ psychopathic deviant T scores. This score measures a person’s need for control or their rebellion against control, and it is part of a commonly used mental health test called the Minnesota Multiphasic Personality Inventory (MMPI) test. The experiment had three treatment groups:

  1. Four hours of sensory restriction plus a 15 minute “therapeutic" tape advising that professional help is available.

  2. Four hours of sensory restriction plus a 15 minute “emotionally neutral” tape on training hunting dogs.

  3. Four hours of sensory restriction but no taped message.

Forty-two subjects were randomly assigned to these treatment groups, and an MMPI test was administered before and after the treatment. Distributions of the differences between pre and post treatment scores (pre - post) are shown below, along with some sample statistics. Use this information to independently test the effectiveness of each treatment. Make sure to clearly state your hypotheses, check conditions, and interpret results in the context of the data.12

Three box plots are shown for Treatments 1, 2, and 3. The box plot for "Treatment 1" is slightly right skewed with values ranging from about -10 to about positive 40, and this distribution has one borderline outlier between 30 and 40. The box plot for "Treatment 2" is about symmetric with values ranging from about -20 to about positive 20. The box plot for "Treatment 3" is left skewed with values ranging from about -30 to about positive 10.
 \:

Tr 1 Tr 2 Tr 3
Mean 6.21 2.86 -3.21
SD 12.3 7.94 8.57
n 14 14 14

Exercise 7.32

True / False: comparing means. Determine if the following statements are true or false, and explain your reasoning for statements you identify as false.

  1. When comparing means of two samples where n1=20n_1 = 20 and n2=40n_2 = 40, we can use the normal model for the difference in means since n2≥30n_2 \ge 30.

  2. As the degrees of freedom increases, the tt-distribution approaches normality.

  3. We use a pooled standard error for calculating the standard error of the difference between means when sample sizes of groups are equal to each other.

Notes

  1. (a) The difference in sample means is an appropriate point estimate: xˉn−xˉs=0.40\bar{x}_{n} - \bar{x}_{s} = 0.40. (b) The standard error of the estimate can be calculated using the standard error formula: SE=σn2nn+σs2ns≈sn2nn+ss2ns=1.602100+1.43250=0.26\begin{aligned} SE = \sqrt{\frac{\sigma_n^2}{n_n} + \frac{\sigma_s^2}{n_s}} \approx \sqrt{\frac{s_n^2}{n_n} + \frac{s_s^2}{n_s}} = \sqrt{\frac{1.60^2}{100} + \frac{1.43^2}{50}} = 0.26 \end{aligned} ↩

  2. It is possible that there is a difference but we did not detect it. If there is a difference, we made a Type 2 Error. ↩

  3. We could have collected more data. If the sample sizes are larger, we tend to have a better shot at finding a difference if one exists. In fact, this is exactly what we would find if we examined a larger data set! ↩

  4. You can watch an episode of John Oliver on Last Week Tonight to explore the present day offenses of the tobacco industry. Please be aware that there is some adult language: youtu.be/6UsHHOCH4q8. ↩

  5. H0H_0: the exams are equally difficult, on average. μA−μB=0\mu_A - \mu_B = 0. HAH_A: one exam was more difficult than the other, on average. μA−μB≠0\mu_A - \mu_B \neq 0. ↩

  6. (a) Since the exams were shuffled, the “treatment” in this case was randomly assigned, so independence within and between groups is satisfied. (b) The summary statistics suggest the data are roughly symmetric about the mean, and the min/max values don’t suggest any outliers of concern. ↩

  7. Scanlon, T.J. et al. Is Friday the 13th Bad For Your Health?. BMJ. 1993. ↩

  8. Wickham, H. ggplot2: elegant graphics for data analysis. Springer New York. 2009. ↩

  9. Chicken Weights by Feed Type, from the datasets package in R. ↩

  10. U.S. Department of Energy, Fuel Economy Data, 2012 Datafile. ↩

  11. U.S. Department of Energy, Fuel Economy Data, 2012 Datafile. ↩

  12. Prison isolation experiment, stat.duke.edu/resources/datasets/prison-isolation. ↩

Credit and licence

“7.2 Difference of two means” is from OpenIntro Statistics, Fourth Edition, by David M Diez, Mine Çetinkaya-Rundel and Christopher D Barr, shared under a CC BY-SA 3.0 license. WorldClass Statistics is a derivative of OpenIntro Statistics, shared under the same license; the original book may be found at openintro.org/book/os.

Source: https://www.openintro.org/book/os/

Licence: CC BY-SA 3.0 (creativecommons.org/licenses/by-sa/3.0/). You may share and adapt it under the same licence, with this credit. WorldClass adapted the formatting only: the text is the authors', with interactive parts and links to other sites left out.

Build status · Flash Infinity AI™ is a trademark of AI-Flash Inc.. WorldClass is not affiliated with, approved or accredited by any exam board, curriculum provider or university unless a page says so.