Two Population Means with Unknown Standard Deviations

Learning Outcomes

  • Classify hypothesis tests by type
  • Conduct and interpret hypothesis tests for two population means, population standard deviations unknown
  1. The two independent samples are simple random samples from two distinct populations.
  2. For the two distinct populations:
    • if the sample sizes are small, the distributions are important (should be normal)
    • if the sample sizes are large, the distributions are not important (need not be normal)

Note: The test comparing two independent population means with unknown and possibly unequal population standard deviations is called the Aspin-Welch t-test. The degrees of freedom formula was developed by Aspin-Welch.


For this course, we will use an applet that calculates the p-value.

http://www.rossmanchance.com/applets/2021/tbia/TBIA.html


Example

The average amount of time boys and girls aged seven to 11 spend playing sports each day is believed to be the same. A study is done and data are collected, resulting in the data in the table below. Each populations has a normal distribution.

Sample Size Average Number of Hours Playing Sports Per Day Sample Standard Deviation
Girls 9 2 [latex]0.866[/latex]
Boys 16 3.2 [latex]1.00[/latex]

Is there a difference in the mean amount of time boys and girls aged seven to 11 play sports each day? Test at the 5% level of significance.

Solution:

The population standard deviations are not known. Let g be the subscript for girls and b be the subscript for boys. Then, μg is the population mean for girls and μb is the population mean for boys. This is a test of two independent groups, two population means.

Random variable: [latex]\displaystyle\overline{{X}}_{{{g}}}-\overline{{X}}_{{b}} [/latex] = difference in the sample mean amount of time girls and boys play sports each day.

[latex]H_0:\mu_g=\mu_b [/latex]; [latex]H_0:\mu_g-\mu_b=0 [/latex]

[latex]H_a:\mu_g\neq\mu_b [/latex]; [latex]H_a:\mu_g-\mu_b\neq{0} [/latex]

The words “the same” tell you H0 has an equal sign. Since there are no other words to indicate Ha, assume it says “is different.” This is a two-tailed test.

Distribution for the test: Use Rossman/Chance Theory-based Inference Applet

Calculate the p-value using a Student’s t-distribution: p-value = 0.0054

 

Make a decision: Since p-value < α, reject [latex]H_0[/latex]. This means you reject [latex]mu_g=\mu_b [/latex]. The means are different.

 

Conclusion: At the 5% level of significance, the sample data show there is sufficient evidence to conclude that the mean number of hours that girls and boys aged seven to 11 play sports per day is different (mean number of hours boys aged seven to 11 play sports per day is greater than the mean number of hours played by girls OR the mean number of hours girls aged seven to 11 play sports per day is greater than the mean number of hours played by boys).

 

try it

Two samples are shown in the table. Both have normal distributions. The means for the two populations are thought to be the same. Is there a difference in the means? Test at the 5% level of significance.  Use the Rossman/Chance Applet to find the p-value.

Sample Size Sample Mean
Population A 25 5 1
Population B 16 4.7 1.2

 


Note: When the sum of the sample sizes is larger than 30 (n1 + n2 > 30) you can use the normal distribution to approximate the Student’s t.


Example

A study is done by a community group in two neighboring colleges to determine which one graduates students with more math classes. College A samples 11 graduates. Their average is four math classes with a standard deviation of 1.5 math classes. College B samples nine graduates. Their average is 3.5 math classes with a standard deviation of one math class. The community group believes that a student who graduates from college A has taken more math classes, on the average. Both populations have a normal distribution. Test at a 1% significance level. Answer the following questions.

  1. Is this a test of two means or two proportions?
  2. Are the populations standard deviations known or unknown?
  3. Which distribution do you use to perform the test?
  4. What is the random variable?
  5. What are the null and alternate hypotheses?
  6. Is this test right-, left-, or two-tailed?
  7. What is the p-value?
  8. Do you reject or not reject the null hypothesis?

Solution:

  1. two means
  2. unknown
  3. Student’s t
  4. [latex]\displaystyle\overline{{X}}_{{{A}}}-\overline{{X}}_{{B}} [/latex]
  5. H0: μA μB
    Ha: μA> μB
  6. right
  7. 0.1928
  8. Do not reject.

Conclusion: At the 1% level of significance, from the sample data, there is not sufficient evidence to conclude that a student who graduates from college A has taken more math classes, on the average, than a student who graduates from college B.

try it

A study is done to determine if Company A retains its workers longer than Company B. Company A samples 15 workers, and their average time with the company is five years with a standard deviation of 1.2. Company B samples 20 workers, and their average time with the company is 4.5 years with a standard deviation of 0.8. The populations are normally distributed.

  1. Are the population standard deviations known?
  2. Conduct an appropriate hypothesis test. At the 5% significance level, what is your conclusion?


Example

A professor at a large community college wanted to determine whether there is a difference in the means of final exam scores between students who took his statistics course online and the students who took his face-to-face statistics class. He believed that the mean of the final exam scores for the online class would be lower than that of the face-to-face class. Was the professor correct? The randomly selected 30 final exam scores from each group are listed in the two tables below:

Online Class:

67.6 41.2 85.3 55.9 82.4 91.2 73.5 94.1 64.7 64.7
70.6 38.2 61.8 88.2 70.6 58.8 91.2 73.5 82.4 35.5
94.1 88.2 64.7 55.9 88.2 97.1 85.3 61.8 79.4 79.4

Face-to-face Class:

77.9 95.3 81.2 74.1 98.8 88.2 85.9 92.9 87.1 88.2
69.4 57.6 69.4 67.1 97.6 85.9 88.2 91.8 78.8 71.8
98.8 61.2 92.9 90.6 97.6 100 95.3 83.5 92.9 89.4

Is the mean of the Final Exam scores of the online class lower than the mean of the Final Exam scores of the face-to-face class? Test at a 5% significance level. Answer the following questions:

  1. Is this a test of two means or two proportions?
  2. Are the population standard deviations known or unknown?
  3. Which distribution do you use to perform the test?
  4. What is the random variable?
  5. What are the null and alternative hypotheses? Write the null and alternative hypotheses in words and in symbols.
  6. Is this test right, left, or two tailed?
  7. What is the p-value?
  8. Do you reject or not reject the null hypothesis?
  9. At the ___ level of significance, from the sample data, there ______ (is/is not) sufficient evidence to conclude that ______.

(Review the conclusion in the previous example and write yours in a similar fashion)

Be careful not to mix up the information for Group 1 and Group 2!

Solution:

Using Excel:

*When you have raw data, T.TEST function can be used.  The syntax is T.TEST(array1, array2, tails, type) where array1 and array2 contain the sample data from two samples, tails is takes 1 for a one-tailed distribution and takes 2 for a two-tailed distribution, and type is the kind of t-test to perform.  T.TEST, if tails=1, returns the probability of a higher value the t-statistic under the assumption that array1 and array2 are samples from populations with the same mean.  T.TEST if tails=2, is double that returned when tails=1 and corresponds to the probability of a higher absolute value of the t-statistic under the “same population means” assumption.

Video for reference:

 

Using TI-83/84:

First put the data for each group into two lists (such as L1 and L2). Press STAT. Arrow over to TESTS and press 4:2SampTTest. Make sure Data is highlighted and press ENTER. Arrow down and enter L1 for the first list and L2 for the second list. Arrow down to
μ1: and arrow to ≠ μ2 (does not equal). Press ENTER. Arrow down to Pooled: No. Press ENTER. Arrow down to Calculate and press ENTER.

  1. two means
  2. unknown
  3. Student’s t
  4. [latex]\displaystyle\overline{{X}}_{{1}}-\overline{{X}}_{{2}} [/latex]
    1. H0: μ1 = μ2 Null hypothesis: the means of the final exam scores are equal for the online and face-to-face statistics classes.
    2. Ha: μ1 < μ2 Alternative hypothesis: the mean of the final exam scores of the online class is less than the mean of the final exam scores of the face-to-face class.
  5. left-tailed
  6. p-value = 0.0011
    This is a normal distribution curve with mean equal to zero. A vertical line near the tail of the curve to the left of zero extends from the axis to the curve. The region under the curve to the left of the line is shaded representing p-value = 0.0011.
  7. Reject the null hypothesis
  8. The professor was correct. The evidence shows that the mean of the final exam scores for the online class is lower than that of the face-to-face class.At the 5% level of significance, from the sample data, there is (is/is not) sufficient evidence to conclude that the mean of the final exam scores for the online class is less than the mean of final exam scores of the face-to-face class.

Try It

Weighted alpha is a measure of risk-adjusted performance of stocks over a period of a year. A high positive weighted alpha signifies a stock whose price has risen while a small positive weighted alpha indicates an unchanged stock price during the time period. Weighted alpha is used to identify companies with strong upward or downward trends. The weighted alpha for the top 30 stocks of banks in the northeast and in the west as identified by Nasdaq on May 24, 2013 are listed in the two tables below.

Northeast

94.2 75.2 69.6 52.0 48.0 41.9 36.4 33.4 31.5 27.6
77.3 71.9 67.5 50.6 46.2 38.4 35.2 33.0 28.7 26.5
76.3 71.7 56.3 48.7 43.2 37.6 33.7 31.8 28.5 26.0

West

126.0 70.6 65.2 51.4 45.5 37.0 33.0 29.6 23.7 22.6
116.1 70.6 58.2 51.2 43.2 36.0 31.4 28.7 23.5 21.6
78.2 68.2 55.6 50.3 39.0 34.1 31.0 25.3 23.4 21.5

Is there a difference in the weighted alpha of the top 30 stocks of banks in the northeast and in the west? Test at a 5% significance level. Answer the following questions:

  1. Is this a test of two means or two proportions?
  2. Are the population standard deviations known or unknown?
  3. Which distribution do you use to perform the test?
  4. What is the random variable?
  5. What are the null and alternative hypotheses? Write the null and alternative hypotheses in words and in symbols.
  6. Is this test right, left, or two tailed?
  7. What is the p-value?
  8. Do you reject or not reject the null hypothesis?
  9. At the ___ level of significance, from the sample data, there ______ (is/is not) sufficient evidence to conclude that ______.

More Context

The comparison of two population means is very common. A difference between the two samples depends on both the means and the standard deviations. Very different means can occur by chance if there is great variation among the individual samples. In order to account for the variation, we take the difference of the sample means, [latex]\displaystyle\overline{{X}}_{{1}}-\overline{{X}}_{{2}} [/latex], and divide by the standard error in order to standardize the difference. The result is a t-score test statistic.

Because we do not know the population standard deviations, we estimate them using the two sample standard deviations from our independent samples. For the hypothesis test, we calculate the estimated standard deviation, or standard error, of the difference in sample means, [latex]\displaystyle\overline{{X}}_{{1}}-\overline{{X}}_{{2}} [/latex].

The standard error is: [latex]\displaystyle\sqrt{\frac{(s_1)^2}{n_1}+\frac{(s_2)^2}{n_2}} [/latex]

The test statistic* (t-score) is calculated as follows: [latex]\frac{(\overline{x}_1-\overline{x}_2)-(\overline{\mu}_1-\overline{\mu}_2)}{\displaystyle\sqrt{\frac{(s_1)^2}{n_1}+\frac{(s_2)^2}{n_2}}} [/latex]

Where: s1 and s2, the sample standard deviations, are estimates of σ1 and σ2, respectively. σ1 and σ1 are the unknown population standard deviations. [latex]\displaystyle\overline{{x}}_{{1}} [/latex] and [latex]\overline{{x}}_{{2}} [/latex] are the population means.

For simplicity, the number of degrees of freedom is the smaller of n1– 1 and n2– 1.

*Note: There is no exact method for comparing two means with unequal populations, but this statistic is a close approximation. It is known as Welch’s approximate t, in honor of English statistician Bernard Lewis Welch (1911-1989).

We will not use these formulas in this class!

Concept Review

Two population means from independent samples where the population standard deviations are not known

  • Random Variable: [latex]\displaystyle\overline{{X}}_{{1}}-\overline{{X}}_{{2}} [/latex] = the difference of the sampling means
  • Distribution: Student’s t-distribution with degrees of freedom 

Summary of Requirements:

  • There are two simple random samples.
  • The samples are independent.
  • The sample sizes are either at least 30 or the populations are normally distributed.
  • The population standard deviations are unknown and assumed to be unequal (cannot be “pooled”).