Week 4 - Statistical hypothesis testing (2)(1)
Week 4 - Statistical hypothesis testing (2)(1)
Statistical Hypothesis
testing (2)
Z-test statistic
t-test statistic
Paired t-test statistic
F-test statistic
Learning objectives
or
• Calculation:
ഥ𝟏 − 𝒙
𝒙 ഥ𝟐 − 𝝁𝟏 − 𝝁𝟐
𝒁𝒔𝒄𝒐𝒓𝒆 =
𝜹𝟏 𝟐 𝜹𝟐 𝟐
𝒏𝟏 + 𝒏𝟐
𝜹𝟏 𝟐 𝜹𝟐 𝟐
ഥ𝟏 − 𝒙
𝑨% 𝑪𝑰𝝁𝟏 −𝝁𝟐 = 𝒙 ഥ𝟐 ± 𝒁𝟏−𝑨% +
𝟐 𝒏𝟏 𝒏𝟐
A sample of 87 men showed that the average calcium
depletion per year is 3352 µg. The population standard
deviation is 1100 µg. A sample of 76 women showed
that the average calcium depletion per year is 5727 µg,
with a population standard deviation of 1700 µg. A
researcher wants to “prove” that women lose more
calcium. If they use 𝛼 = 0.001 and these sample data,
will they be able to reject a null hypothesis that
women annually lose as much (or less) calcium as men
do?
Suppose we want to conduct a hypothesis test to
determine whether the average annual growth for an
animal species is different from the average annual
growth of another species.
Difference in 2 Means using t-test statistic
or
• Calculation:
ഥ𝟏 − 𝒙
𝒙 ഥ𝟐 − 𝝁𝟏 − 𝝁𝟐
𝒕𝒔𝒄𝒐𝒓𝒆 = , 𝒘𝒉𝒆𝒓𝒆 𝒅𝒇 = 𝒏𝟏 + 𝒏𝟐 − 𝟐
𝒔𝟏 𝟐 𝒏𝟏 − 𝟏 + 𝒔𝟐 𝟐 𝒏𝟐 − 𝟏 𝟏 𝟏
+
𝒏𝟏 + 𝒏𝟐 − 𝟐 𝒏𝟏 𝒏𝟐
𝒔𝟏 𝟐 𝒏𝟏 −𝟏 +𝒔𝟐 𝟐 𝒏𝟐 −𝟏 𝟏 𝟏
ഥ𝟏 − 𝒙
𝑨% 𝑪𝑰𝝁𝟏 −𝝁𝟐 = 𝒙 ഥ𝟐 ± 𝒕𝟏−𝑨% + 𝒏 , 𝒘𝒉𝒆𝒓𝒆 𝒅𝒇 = 𝒏𝟏 + 𝒏𝟐 − 𝟐
𝟐
𝒏𝟏 +𝒏𝟐 −𝟐 𝒏𝟏 𝟐
A researcher conducted an experiment on different
hatching methods for shrimps. She/he wants to know if
different hatching methods give different number of
hatched shrimps, thus, it will be used for the process.
• Calculation:
σ𝒅 𝟐
ഥ−𝑫
𝒅 σ𝒅 σ 𝒅𝟐
− 𝒏
𝒕𝒔𝒄𝒐𝒓𝒆 = ഥ
, 𝒘𝒉𝒆𝒓𝒆 𝒅𝒇 = 𝒏 − 𝟏, 𝐰𝐢𝐭𝐡 𝒅 = 𝒂𝒏𝒅 𝒔𝒅 =
𝒔𝒅 𝒏 𝒏−𝟏
𝒏
ഥ ±𝒕𝟏−𝑨% 𝒔𝒅 , 𝒘𝒉𝒆𝒓𝒆 𝒅𝒇 = 𝒏 − 𝟏
𝑨% 𝑪𝑰𝑫 = 𝒅
𝟐
𝒏
Suppose a stock market investor is
interested in determining whether
there is a significant difference in the
W/H (weight to height) ratio for 2
years old children of different ethnic
groups in Vietnam at 𝛼 = 0.01. In an
effort to study this question, the
investor randomly samples nine ethnic
groups from Vietnam and records the
W/H ratios for each if these groups at
the end of year 1 and at the end of
year 2.
An analyst estimated with
99% level of confidence that
there is no difference in the
number of bacteria colonies
with and without treatments
of antibiotics. Calculate the
confident interval for mean
difference to disclaim
his/her estimation.
Difference in 2 Proportions using Z-test statistic
• Calculation:
ෝ𝟏 − 𝒑
𝒑 ෝ𝟐 − 𝒑𝟏 − 𝒑𝟐 𝒙𝟏 + 𝒙𝟐
𝒁𝒔𝒄𝒐𝒓𝒆 = ഥ=
, 𝒘𝒊𝒕𝒉 𝒑 ഥ =𝟏−𝒑
𝒂𝒏𝒅 𝒒 ഥ
𝟏 𝟏 𝒏𝟏 + 𝒏𝟐
ഥ. 𝒒
𝒑 ഥ +
𝒏𝟏 𝒏𝟐
ෝ𝟏 . 𝒒
𝒑 ෝ𝟏 𝒑ෝ𝟐 . 𝒒
ෝ𝟐
ෝ𝟏 − 𝒑
𝑨% 𝑪𝑰𝒑𝟏 −𝒑𝟐 = 𝒑 ෝ𝟐 ± 𝒛𝟏−𝑨% +
𝟐 𝒏𝟏 𝒏𝟐
Calculate the CI and test the hypotheses of different
population proportion between 2 samples, with
indicated significance level:
• Calculation:
𝒔𝟏 𝟐
𝑭𝒔𝒄𝒐𝒓𝒆 = 𝟐 , 𝒘𝒊𝒕𝒉 𝒅𝒇𝒏𝒖𝒎𝒆𝒓𝒂𝒕𝒐𝒓 = 𝒗𝟏 = 𝒏𝟏 − 𝟏 𝒂𝒏𝒅 𝒅𝒇𝒅𝒆𝒏𝒐𝒎𝒊𝒏𝒂𝒕𝒐𝒓 = 𝒗𝟐 = 𝒏𝟐 − 𝟏
𝒔𝟐
*** Note: 𝐹𝑐𝑟𝑖 𝑖𝑛 𝑟𝑖𝑔ℎ𝑡 𝑡𝑎𝑖𝑙 𝑎𝑛𝑑 𝑙𝑒𝑓𝑡 𝑡𝑎𝑖𝑙 𝑎𝑟𝑒 𝑛𝑜𝑡 𝑠𝑦𝑚𝑚𝑒𝑡𝑟𝑖𝑐
Suppose a machine produces metal sheets that are specified to be 22
millimeters thick. Because of the machine, the operator, the raw
material, the manufacturing environment, and other factors, there is
variability in the thickness. Two machines produce these sheets.
Operators are concerned about the consistency of the two machines. To
test consistency, they randomly sample 10 sheets produced by machine 1
and 12 sheets produced by machine 2. The thickness measurements of
sheets from each machine are given in the table. Assume sheet thickness
is normally distributed in the population. How can we test to determine
whether the variance from each sample comes from the same population
variance (population variances are equal) or from different population
variances (population variances are not equal)?