Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 15

Environmental Data Analysis

Lecture 4

Dr. Zhi NING


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
1. ONE-SAMPLE T TEST

• Assumptions:
1. Dependent variables should be normally distributed.
2. Samples drawn from the population should be random.
3. Cases of the samples should be independent.
4. We should know the population mean.
• Hypothesis:
– A. Null hypothesis: assumes that there are no significance
differences between the population mean and the sample
mean.
– B. Alternative hypothesis: assumes that there is a significant
difference between the population mean and the sample
mean.
1. ONE-SAMPLE T TEST

• Procedures:

1. Calculate the standard deviation for the sample by using this formula:
Where, S = Standard deviation, = sample mean,
n = number of observations in sample

2. Calculate the value of the one sample t-test, by using this formula:
Where, t = one sample t-test value,
µ= population mean

3. Calculate the degree of freedom by using this formula:


V=n–1 Where, V= degree of freedom

4. Hypothesis testing:
Compare the calculated value with the table value. If the calculated value is greater
than the table value, then we will reject the null hypothesis, and accept the
alternative hypothesis.
2. Dependent t-test for paired samples

• Assumptions:
– The data follow a normal distribution
– 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.
2. Dependent t-test for paired samples

• Procedures
1. Calculate the average of the differences

2. The sample variance of the differences

3. The standard error of the average difference is

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


difference (), which are
3. 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
3. 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


Summary

• Hypothesis Test
– Analysis of Variance (ANOVA)
• Comparison of within treatment variation and variation
between the treatments
– F test on difference of variance
• Non parametric test
– Monte Carlo method
• Analyze uncertainties;
– Bootstrap method
• Random sampling.
4. 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!
4. 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:
5. 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:
Examples

• Another example:

• One sided or two sided test?


• In a case where a positive deviation is undesirable but a negative deviation
is not, a one-sided test would be indicated.
– (1) judging compliance with an environmental protection limit where high values indicate a violation,
and
– (2) an experiment intended to investigate whether adding chemical A to the process
increases the efficiency.
• If the experimental question is whether adding chemical A changes the efficiency
(either for better or worse), a two-sided test would be indicated.
Example Independent t-Test

• Exercise
Examples

You might also like