STAT 205 & 207 - Week 10 (Hypothesis Test For Comparing Two Parameters) (Completed)

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 21

STAT 205 / 207 (Week 10)

Comparing two population means (Ch 9.4)


Understanding hypothesis testing (Ch 8.5)

John Sang Jin Kang


sangjin.kang@ucalgary.ca
2021 Winter Semester
What topics would be covered in the hypothesis
test for comparing two parameters?
• The hypothesis test for comparing two population means (Ch 9.4)
• Difference between independent samples and paired samples
• Procedure of the hypothesis test for two population means from the
independent samples
• Procedure of the hypothesis test for two population means from the paired
samples

• Understanding hypothesis testing (Ch 8.5)


• Significance level, type I error, type II error, power of the statistical test
• Statistical significance vs. practical significance
• The logic of the hypothesis test
The hypothesis test for comparing two
population means

Section 9.4.
Independent vs. dependent samples
• When comparing two populations, it is important to note whether the
data come from two independent samples or from paired (dependent)
samples.

• Independent samples
• When the values observed in the sample from one population are not related to
the values observed in the sample from the second population.
• Example: Gas price in Vancouver vs. in Toronto
• Paired (dependent) samples
• Once an individual, or thing, is randomly picked up from a population of
individuals (or things), we observe a variable on that individual (or thing)
under two different settings.
• Example: Comparing the wine price at two different stores (pairs of wine
prices for each wine is compared)
• Also the dependence results when the objects being measured are related
somehow. (comparing twins, siblings, or spouses)
• Or the experimenters have deliberately matched subjects in the two
populations so that each pair of subjects has similar character.
Example
• People chosen in a random sample are asked how many minutes they
spend reading and how many minutes they spent exercising during a
certain day. Researchers wanted to know how different the mean
amounts of time were for each activity.

• Q: Is this a dependent or an independent sample?


• Subjects were tested for their sense of smell twice: once when lying
down, once while sitting up. Researchers want to know whether the
mean ability to detect smells differs depending on whether one is
sitting up or lying down.

• Q: Is this a dependent or an independent sample?


• A sample of men and women each had their hearing tested.
Researchers wanted to know whether, typically, men and women
differed in their hearing ability.

• Q: Is this a dependent or an independent sample?


Why do we need to distinct between the
independent samples and the paired samples?
• The procedure of the hypothesis test for the independent samples and
the pair samples are different.

• Example 2 (Dieting) from the hypothesis test for the population mean
originally comes from the paired sample. (the weight before starting
the diet and the weight after 12 months of diet)
Hypothesis test for comparing
the two population means
(for independent samples)
The confidence interval for the mean difference is skipped.
(Disregard page 422~425)
Nice thing is…
• The procedure of hypothesis test for comparing two population means
from the independent samples is same.
• Four steps are same.

• The only difference is what test-statistic is used and what degree of


freedom is used for the t-distribution
1. Hypothesize. State your hypotheses about the population parameter.
2. Prepare. State a significance level, choose an appropriate test
statistic, state and check conditions required for future computations,
state any assumptions that must be made.
3. Compute to Compare. Compute the observed value of the test
statistic and compare it to what the null hypothesis said you would
get. Find the p-value in order to measure your level of surprise.
4. Interpret and Conclude. Do you reject or not reject your null
hypothesis? What does this mean in the context of the data?
• Hypothesis test for the mean differences (using two independent
samples)
• Test statistic used in the hypothesis test for the mean differences
The p-values for a population mean:
Conditions to check
1. Random sample
2. If the sample size for the associated sample is small (𝑛 < 25), the
distribution of the corresponding population follows the normal
distribution.
3. If the sample size for the associated sample is large (𝑛 ≥ 25), the
distribution of the corresponding population does not matter.
4. The null hypothesis is true.
The complicated degree of freedom
• The degree of freedom calculated is coming from very complicated
formula
• No need to memorize!!
• If we get a p-value that is less than our significance level α, our p-
value is considered small (we are really surprised!) and we reject the
null hypothesis.
• If we get a p-value that is greater than or equal to our significance
level α, our p-value is not considered small (we are not surprised) and
we do not reject the null hypothesis

• p-value < α → Reject H0


• p-value  α → Fail to reject H0
Example
• Use the data summarized in the table to test the claim that the mean
number of dollars spent on the last haircut is different for females and
for males at this school.

Blank n x̅ s
Females 119 42.78 41.40
Males 66 13.13 9.80
Solution
1. Hypothesize

2. Prepare
3. Compute to compare
4. Interpret and conclude

You might also like