0% found this document useful (0 votes)
14 views29 pages

Lecture 3 Hypothesis Test II - Updated2

Uploaded by

sharontao
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views29 pages

Lecture 3 Hypothesis Test II - Updated2

Uploaded by

sharontao
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 29

Environmental Data analysis

Lecture 3

Dr. Zhi NING


Notice

• Homework this week.


• Due for two weeks.
One-sample t Test

• To examine the mean difference between the sample and the


known value of the population mean µ0.

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

• To assess whether the average of the


difference of two paired samples is different
from zero.

• 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

2. The sample variance of the differences

Sd Sd as standard deviation;
Sd2 as the variance.

3. The standard error of the average difference is

4. Establish the 1-  confidence limits for the real


difference, which are
Dependent t-test for paired samples

• 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

1. The average of differences of the two methods

2. The variance of the paired differences is:

3. The standard error of the average of the paired


difference

4. Define confidence interval as 95%, given  =13 (df),


find out the t value at /2=0.025 (t13,0.025= 2.160),

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

• To assess whether the difference of the two


averages from two independent groups is
zero.

• 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

2. The variance of the averages

3. The variance of the difference is

4. The variances are unknown so they are estimated from


Independent t-Test

5. Pool the standard deviations together if s1 and s2


are not very different

6. The estimated variance of the difference is

7. The standard error is the square root

8. Student’s t distribution is used to compute the level


confidence interval with df of “n1+n2-2” and α/2
Independent t-Test

• 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

One-sample t Paired t Independent t


Null hypothesis No significant difference Difference between Two data sets have
between measured two averages is the same means
mean and real mean zero
Alternative There is significant Not zero Two data sets have
hypothesis difference… different means

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)

• An experiment has k treatments (techniques,


methods, etc.) with nt replicate observations
made under each treatment,
• If the variation within each treatment is due
only to random measurement error, this
within-treatment variance is a good estimate
of the pure random experimental error.
• If the k treatments are different, the variation
between the k treatments will be greater than
the variation within the treatment.
Analysis of Variance (ANOVA)

An experiment compares treatments A, B, C, • Between treatment variance


and yields the data shown below.

• Within treatment variance:

• F ratio:
– sb2/sw2

Be careful of the number of observations!!


If there are equal number of observations in each treatment, then:
Analysis of Variance (ANOVA)
Analysis of Variance (ANOVA)

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:

• Here N: sample size S: the sampled standard


deviation σ: the true standard deviation
Analysis of Variance (ANOVA)

• 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

• We want to know if the standard deviation


estimated from two samples are significantly
different.

• The statistical test used to compare the


variability of two samples is the F-test:
Significance Test of difference of variance
Significance Test of difference of variance
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

• There are two samples, each has six measurements of wind


speed. The first sample measures a wind speed variance of 10
(m/sec)^2. The second sample measures a 6 (m/sec)^2 variance.
Are these two variance significantly different?
Examples

You might also like