Lecture 3 Hypothesis Test II - Updated2
Lecture 3 Hypothesis Test II - Updated2
Lecture 3
Sample distribution
Test value in one sample t test
Critical t value
Test level, α
Test value t
corresponding t
x
Test value, x
http://www.wadsworth.com/psychology_d/special_features/ext/workshops/t_testsample1.html
Dependent t-test for paired samples
• Applications:
– Two methods for making a chemical analysis are
compared to see if the new one is equivalent to
the older standard method;
– Algae are grown under different conditions to
study a factor that is thought to stimulate growth;
– Two waste treatment processes are tested at
different levels of stress caused by a toxic input.
Dependent t-test for paired samples
• Assumptions:
– The data follow a normal distribution (but we have
limited samples from the normal distribution and
we use t to describe the limited samples)
– The individual samples from each pair are
independent.
• Hypotheses:
– Null hypothesis: the distribution of differences
between the two pairs of samples has central
value zero.
– Alternative hypothesis: the distribution of
differences between the two pairs of samples has
a central value different from zero.
Dependent t-test for paired samples
• Procedures
1. Calculate the average of the differences
Sd Sd as standard deviation;
Sd2 as the variance.
• Example
– Two methods were tested for a
sample in 14 different labs and Dissolved
Laboratory Oxgen (mg/L)
we want to know if the two Method Winkler Electrode
1 1.2 1.6
methods produce the same 2
3
1.4
1.4
1.4
1.9
result. 4
5
1.3
1.2
2.3
1.7
– Hypothesis: 6
7
1.3
1.4
1.3
2.2
8 2.0 1.4
• H0: There is no significant difference 9 1.9 1.3
10 1.1 1.7
of the two methods results. 11 1.8 1.9
12 1.0 1.8
• Ha: The difference of the two has a 13 1.1 1.8
14 1.4 1.8
mean different from 0.
Dependent t-test for paired samples
5. The difference between the two methods is not zero because the
confidence interval does not include the difference of zero.
Moreover, the Winkler method reports lower values than electrode
method
Independent t-Test
• Applications:
– Fukushima nuclear power plant released radiation
after 03/11 earthquake. if the radiation level in
Hong Kong is affected by the radiation?
– Two different water supplies in a city residential
area may contain different concentration of
mercury, one is municipal water supply and the
other is from private wells.
Independent t-Test
• Assumptions:
– Independent variable consists of two independent
groups;
– The samples in each group are approximately
normally distributed;
– Similar variance between the two groups.
• Hypothesis:
– Null hypothesis: the difference between the
averages of the two independent samples is zero.
– Alternative hypothesis: the difference between the
two independent samples is not zero.
http://statistics.laerd.com/spss-tutorials/independent-t-test-using-spss-statistics.php
Independent t-Test
• Procedures
1. The difference of the averages of the two samples
• Example
– Water specimens from a residential area served by city water supply are
indicated by subscript c; p indicates specimens taken from a residential
area served by private well.
average 0.1569 0.1510
Mercury concentrations difference 0.0059
(µg/L) standard deviation 0.0844 0.0874
standard error 0.0244 0.0291
Sample Sample
City supply Private well
number number Spool^2 0.0073
1 0.34 1 0.26
2 0.18 2 0.06 Variance of
3 0.13 3 0.16 difference 0.0013
4 0.09 4 0.19
Standard error
5 0.16 5 0.32
of the variance
6 0.09 6 0.16 of difference 0.0360
7 0.16 7 0.08
8 0.10 8 0.05 so, the df is 13+10-2=21, alpha α is 0.05 for both tails
9 0.14 9 0.10 t (21,0.025) 2.080
10 0.26 10 0.13
11 0.06
12 0.26
13 0.07 range -0.069 0.081
– With 95% confidence, true difference between city and private water
supplies falls in the interval of −0.069 µg/L and 0.081 µg/L.
– This confidence interval includes zero so there is no persuasive evidence in
these data that the mercury contents are different in the two residential
areas.
Independent t-Test
• Exercise
Independent t-Test
• Exercise
Test of Hypothesis
Brief Review
Critical value
and equation
Test level
(=0.05)
Test method 1 p=T.DIST(t, df, tails) Range covers 0; Range covers 0
Critical t vs.
calculated t.
Conditions p<, then reject Ho Difference is not Difference is not
significant at 95% significant at 95%
CI CI
Test method 2 T.INV(, df)
Conditions T.INV(, df) >t, then
reject Ho
Analysis of Variance (ANOVA)
• ANOVA
– Determine whether two or more treatments sample
means could have been obtained from populations
with the same true mean.
– Compare the variation within treatments and
between treatments.
– F statistic: a measure of variability of variances
– t statistic: a measure of variability of estimated
mean
– Two most important parameters of normal
distribution!
Analysis of Variance (ANOVA)
• F ratio:
– sb2/sw2
F distribution
• Standard deviation is another important population
parameter of normal distribution.
• F is the ratio of two chi-squares, each divided by its df.
• The sample variances have a Chi-Squared
(χ2) distribution, with the following definition:
• Procedures
– Select 95% significance level (=0.05)
– Null hypothesis
• No difference exists between the k means.
– Alternative hypothesis
• The k means are different
– Use F test
– If F > F(=0.05), then reject H0
• There is sufficient evidence to conclude at significance
level of 95% that the means of the three treatments are
not equal.
Significance Test of difference of variance
http://www.stat.ucla.edu/~dinov/
courses_students.dir/Applets.dir/
F_Table.html
Significance Test of difference of variance