1 of 19

Inference for the Difference of two means

To save and make a local (editable) copy, do: File, Make a copy. �

Advanced High School Statistics

Slides developed by Mine Çetinkaya-Rundel of OpenIntro, modified by Leah Dorazio for use with AHSS.

The slides may be copied, edited, and/or shared via the CC BY-SA license

Some images may be included under fair use guidelines (educational purposes)

2 of 19

Diamonds

  • Weights of diamonds are measured in carats.
  • 1 carat = 100 points, 0.99 carats = 99 points, etc.
  • The difference between the size of a 0.99 carat diamond and a 1 carat diamond is undetectable to the naked human eye, but does the price of a 1 carat diamond tend to be higher than the price of a 0.99 diamond?
  • We are going to test to see if there is a difference between the average prices of 0.99 and 1 carat diamonds.
  • In order to be able to compare equivalent units, we divide the prices of 0.99 carat diamonds by 99 and 1 carat diamonds by 100, and compare the average point prices.

3 of 19

Data

These data are a random sample from the diamonds data set in ggplot2 R package.

4 of 19

Parameter and point estimate

Parameter of interest�Average difference between the point prices of all 0.99 carat and 1 carat diamonds.

µpt99 - µpt100

Point estimate�Average difference between the point prices of sampled 0.99 carat and 1 carat diamonds.

pt99 - x̄pt100

5 of 19

Hypotheses

Which of the following is the correct set of hypotheses for testing if the average point price of 1 carat diamonds (pt100) is higher than the average point price of 0.99 carat diamonds (pt99)?

  1. H0: µpt99 = µpt100�HA: µpt99 ≠ µpt100
  2. H0: µpt99 = µpt100�HA: µpt99 > µpt100
  3. H0: µpt99 = µpt100�HA: µpt99 < µpt100
  4. H0: x̄pt99 = x̄pt100�HA: x̄pt99 < x̄pt100

6 of 19

Hypotheses

Which of the following is the correct set of hypotheses for testing if the average point price of 1 carat diamonds (pt100) is higher than the average point price of 0.99 carat diamonds (pt99)?

  • H0: µpt99 = µpt100�HA: µpt99 ≠ µpt100
  • H0: µpt99 = µpt100�HA: µpt99 > µpt100
  • H0: µpt99 = µpt100�HA: µpt99 < µpt100
  • H0: x̄pt99 = x̄pt100�HA: x̄pt99 < x̄pt100

7 of 19

Conditions

Which of the following does not need to be satisfied in order to conduct this hypothesis test using theoretical methods?

  1. Point price of one 0.99 carat diamond in the sample should be independent of another, and the point price of one 1 carat diamond should independent of another as well.
  2. Point prices of 0.99 carat and 1 carat diamonds in the sample should be independent.
  3. Distributions of point prices of 0.99 and 1 carat diamonds should not be extremely skewed.
  4. Both sample sizes should be at least 30.

8 of 19

Conditions

Which of the following does not need to be satisfied in order to conduct this hypothesis test using theoretical methods?

  • Point price of one 0.99 carat diamond in the sample should be independent of another, and the point price of one 1 carat diamond should independent of another as well.
  • Point prices of 0.99 carat and 1 carat diamonds in the sample should be independent.
  • Distributions of point prices of 0.99 and 1 carat diamonds should not be extremely skewed.
  • Both sample sizes should be at least 30.

9 of 19

Test statistic

The df formula is actually quite complicated. In general, we use a calculator or other technology to find a more precise value for the degrees of freedom. (If this is not available, we can use the conservative estimate of the smaller of n1-1 or n2-1).

Test statistic for inference on the difference of two small sample means

The test statistic for inference on the difference of two small sample means (n1 < 30 and/or n2 < 30) mean is the T statistic.

where

10 of 19

Test statistic (cont.)

in context...

11 of 19

p-value

Which of the following is the correct p-value�for this hypothesis test?

T = -2.508 df = 22

  1. between 0.005 and 0.01
  2. between 0.01 and 0.025
  3. between 0.02 and 0.05
  4. between 0.01 and 0.02

12 of 19

Synthesis

  • p-value is small so reject H0. The data provide convincing evidence to suggest that the point price of 0.99 carat diamonds is lower than the point price of 1 carat diamonds.
  • Maybe buy a 0.99 carat diamond? It looks like a 1 carat, but is significantly cheaper.

What is the conclusion of the hypothesis test? How (if at all) would this conclusion change your behavior if you went diamond shopping?

13 of 19

Equivalent confidence level

What is the equivalent confidence level for a one-sided hypothesis test at α = 0.05?

  1. 90%
  2. 92.5%
  3. 95%
  4. 97.5%

14 of 19

Equivalent confidence level

What is the equivalent confidence level for a one-sided hypothesis test at α = 0.05?

  • 90%
  • 92.5%
  • 95%
  • 97.5%

15 of 19

Critical value

What is the appropriate t* for a confidence interval for the average difference between the point prices of 0.99 and 1 carat diamonds?

  1. 1.32
  2. 1.72
  3. 2.07
  4. 2.82

16 of 19

Critical value

What is the appropriate t* for a confidence interval for the average difference between the point prices of 0.99 and 1 carat diamonds?

  • 1.32
  • 1.72
  • 2.07
  • 2.82

17 of 19

Confidence interval

Calculate the interval, and interpret it in context.

point estimate ± ME

We are 90% confident that the average point price of a 0.99 carat diamond is $15.05 to $2.81 lower than the average point price of a 1 carat diamond.

18 of 19

Recap: Inference using difference of two sample means

If n1 < 30 and/or n2 < 30, difference between the sample means follow a t distribution with

Conditions

  • independence within groups (often verified by a random sample, and if sampling without replacement, n < 10% of population)
  • independence between groups
  • n1 < 30 and/or n2 < 30 and no extreme skew in either group

Hypothesis testing

Confidence interval

point estimate ± t*df x SE

where df can be found on calculator

, where df can be found on calculator

19 of 19

Explore more free resources at openintro.org/ahss, including:

  • AHSS Textbook
  • Videos - content videos, worked examples, TI-84 and Casio tutorials
  • Slides
  • Data Sets
  • Desmos Activities
  • Interactive Tableau graphs
  • Statistical Software Labs
  • Discussion Forums (free support for students and teachers)

Teachers only content is also available for Verified Teachers, including

  • Exercise solutions
  • Sample exams
  • Ability to request a free desk copy for a course
  • Statistics Teachers email group

Questions? Contact us.