Title | ECON2121 Notes 13 |
---|---|
Course | Introductory Econometrics |
Institution | 香港中文大學 |
Pages | 72 |
File Size | 4.2 MB |
File Type | |
Total Downloads | 783 |
Total Views | 822 |
ECON2121 Methods of Economic Statistics Ch Experimental Design and Analysis of Variance 1 Outline 1. 2. 3. 4. 5. An Introduction to Experimental Design Analysis of Variance and the Completely Randomized Design Multiple Comparison Procedures Randomized Block Design Factorial Experiment 2 Example A me...
ECON2121 Methods of Economic Statistics Ch.13 Experimental Design and Analysis of Variance
1
Outline 1. 2. 3. 4. 5.
An Introduction to Experimental Design Analysis of Variance and the Completely Randomized Design Multiple Comparison Procedures Randomized Block Design Factorial Experiment
2
Experimental Design • Study to investigate correlation or even causality between objects. • In an study, a factor is a variable which the experimenter has selected for investigation.
• A treatment is level of a factor. • Experimental units are the objects of interest in the experiment. 3
Example • A medical research is to investigate how a new drug raises the survival rate from a disease.
• In this example, the difference in the survival rates before-
and-after substituting the old drug with the new drug is the factor.
• The frequency of taking the new drug relative to the old
drug is the treatment, for example, a patient is treated with the old drug 3 times per day; or the old drug 2 times only and the new drug 1 time per day.
• The patients treated with the new drug are the experimental units.
4
Example 500 patients treated with only old drugs 3 times per day
500 patients treated with old drugs 2 times and new drug 1 time per day
Survival rate = 50%
Survival rate = 60% 5
Experimental Design • Statistical studies can be classified as being either experimental or observational. • In an experimental study, one or more factors are controlled so that data can be obtained about how the factors influence the variables of interest.
• In an observational study, no attempt is made to control the factors. • Cause-and-effect relationships are easier to establish in experimental studies than in observational studies.
6
Example • Let’s us recall the previous example. Suppose that the
patients may have different eating habits. Some have healthy eating habits (more vegetable, less oily, fat and salty foods). Some eat unhealthily.
• In an observational study, any factors except the drug replacement are not controlled, such as eating habit of the patients.
• The survival rate could be affected by both the drug replacement and simultaneously.
the
variation
in
eating
habits
• It is not objective for us to claim the change in the survival rate is fully attributed to the drug replacement.
7
Example: Observational Study 500 patients treated with only old drugs 3 times per day
500 patients treated with old drugs 2 times and new drug 1 time per day
However, these patients tend to have unhealthy eating habit, which may worsen their survival rate on average.
However, these patients tend to have healthy eating habit, which may improve their survival rate on average.
We can’t conclude which factor is the driver to the rise in survival. Survival rate = 50%
Survival rate = 60% 8
Example • Let’s us recall the previous example.
Suppose now all patients have to eat the same heathy meals provided by the hospital. No foods or drinks outside the hospital are allowed.
• In an experimental study, any factors
including drug replacement are controlled, such as eating habit of the patients.
• Assume that drug replacement and eating habit are the only 2 factors.
9
Example: Experimental Study 500 patients treated with only old drugs 3 times per day
500 patients treated with old drugs 2 times and new drug 1 time per day
Now, all patients are required to eat the same healthy meals provided by the hospital.
Now, all patients are required to eat the same healthy meals provided by the hospital.
Holding other factors constant, we can conclude the rise in survival rate is driven by drug replacement. Survival rate = 50% Survival rate = 60% 10
Experimental Study • In this chapter, 3 kinds of experimental studies will be introduced: 1. a completely randomized design 2. a randomized block design 3. a factorial design
11
Analysis of Variance (ANOVA) • Analysis of Variance (ANOVA) can be used to test for the equality of three or more population means. • Data obtained from observational or experimental studies can be used for the analysis. • We want to use the sample results to test the following hypotheses:
: ⋯
: not all population means are equal
• If is rejected, we cannot conclude that all population means are different. Rejecting means that at least two population means have different values.
12
Analysis of Variance (ANOVA) • Assumptions for Analysis of Variance 1. For each population, the response (dependent) variable is normally distributed. 2. The variance of the response variable, denoted , is the same for all of the populations.
3. The observations must be independent.
13
Analysis of Variance (ANOVA) • Sampling Distribution of , given is true: Sample means are close together because there is only one sampling distribution when H0 is true. =
14
Analysis of Variance (ANOVA) • Sampling Distribution of , given is false:
Sample means come from different sampling distributions and are not as close together when H0 is false.
15
Between-Treatments Estimate of Population Variance • The estimate of
based on the variation of the sample means is called the mean
square due to treatments and is denoted by MSTR. MSTR
∑
1
• Numerator is called the sum of squares due to treatments (SSTR). • Denominator is the degrees of freedom associated with SSTR. 16
Within-Treatments Estimate of Population Variance • The estimate of
based on the variation of the sample observations within each
sample is called the mean square error and is denoted by MSE. MSE
∑ 1
• Numerator is called the sum of squares due to error (SSE). • Denominator is the degrees of freedom associated with SSE. 17
Comparing the Variance Estimates: The F Test • If the null hypothesis is true and the ANOVA assumptions are valid, the sampling distribution of MSTR/MSE is an F distribution with MSTR (degree of freedom) equal to 1 and MSE equal to .
• If the means of the populations are not equal, the value of MSTR/MSE will be inflated because MSTR overestimates .
if the resulting value of MSTR/MSE appears to be too large to have been selected at random from the appropriate F distribution.
• Hence, we will reject
18
Comparing the Variance Estimates: The F Test • Sampling Distribution of MSTR/MSE:
Reject
Do not reject
Critical Value
MSTR/MSE 19
Completely Randomized Design • A completely randomized design is an experimental
design in which the treatments are randomly assigned to the experimental units.
• For example, patients are randomly chosen to be treated with old drug or new drug.
• If the dying patients are chosen to be treated with
the new drug but the lively patients are chosen to be with the old drug, then the result may be that the survival rate of the new drug group is even ‘lower than’ that of the old drug group. We would then mistakenly conclude that the new drug is even worse than the old drug. 20
ANOVA Table for a Completely Randomized Design Source of Variation
Sum of Squares
Degrees of Freedom
Treatments
SSTR
1
Error
SSE
Total
SST*
1**
Mean Square
F
SSTR 1 SSE MSE
MSTR MSE
MSTR
Note*: SST is partitioned into SSTR and SSE. Note**: SST’s degrees of freedom () are partitioned into SSTR’s and SSE’s
p-value
21
ANOVA Table for a Completely Randomized Design • SST divided by its degrees of freedom
1 is the overall sample variance that
would be obtained if we treated the entire set of observations as one data set.
• With the entire data set as one sample, the formula for computing the total sum of squares, SST, is:
22
ANOVA Table for a Completely Randomized Design • ANOVA can be viewed as the process of partitioning the total sum of squares and the degrees of freedom into their corresponding sources: treatments and error.
• Dividing the sum of squares by the appropriate degrees of freedom provides the variance estimates, the F value and the p value used to test the hypothesis of equal population means. 23
Completely Randomized Design: Test for the Equality of Population Means • Hypotheses: : ⋯ : Not all population means are equal
• Test Statistic:
24
Completely Randomized Design: Test for the Equality of Population Means • Rejection Rule: p-value Approach: Critical value Approach:
Reject if p-value
Reject if
where the value of is based on an F distribution with 1 numerator and denominator .
25
Textbook Example • AutoShine, Inc. is considering marketing a longlasting car wax. Three different waxes (Type 1, Type 2, and Type 3) have been developed.
• In order to test the durability of these waxes, 5 new cars were waxed with Type 1, 5 with Type 2, and 5 with Type 3.
• Each car was then repeatedly run through an
automatic carwash until the wax coating showed signs of deterioration. AutoShine, Inc. must decide which wax to market. Are the three waxes equally effective? 26
Textbook Example • The number of times each car went through the carwash before its wax deteriorated: Observation
Wax (Type 1)
Wax (Type 2)
Wax (Type 3)
1
27
33
29
2
30
28
28
3
29
31
30
4
28
30
32
5
31
30
31
Sample mean
29
30.4
30
Sample variance
2.5
3.3
2.5
27
Textbook Example • Factor: Car wax • Treatments: Type 1, Type 2 and Type 3 • Experimental units: Cars • Response variable: Number of washes 28
Textbook Example • Step 1: Develop a hypothesis
:
: Not all population means are equal
where: = mean number of washes using Type k wax for k =1, 2, 3
• Step 2: Choose the level of significance
0.05 29
Textbook Example • Step 3: Compute the Test Statistic: Mean Square Between Treatments:
5 5 5 529 30.4 30 29.8 555 15 5 29 29.8 5 30.4 29.8 5 30 29.8 5.2
5.2 2.6 31
Mean Square Error: 5 1 2.5 5 1 3.3 5 1 2.5 33.2
33.2 2.77 15 3
30
Textbook Example Test Statistic:
2.6 0.939 2.77
• Rejection Rule: p-value Approach: Critical value Approach:
Reject if p-value 0.05
Reject if . 3.89
where the value of . 3.89 is based on an F distribution with 2 numerator and 12 denominator . 31
Textbook Example • Step 4: Determine whether to reject 1.
We cannot reject the because . (or p-value 0.42 0.05).
2.
There is insufficient evidence to conclude that the mean number of washes for the three wax types are not all the same.
32
Test for the Equality of
Population Means
Source of Variation
Sum of Squares
Degrees of Freedom
Mean Square
F
p-value
Treatments
5.2
2
2.6
0.939
0.42
Error
33.2
12
2.77
Total
38.4
14
33
Textbook Example • Janet Reed would like to know if
there is any significant difference in the mean number of hours worked per week for the department managers at her three manufacturing plants (in Buffalo, Pittsburgh, and Detroit).
• A simple random sample of five
managers from each of the three plants was taken and the number of hours worked by each manager in the previous week. 34
Textbook Example • The number of hours worked by each manager in the previous week: Observation
Plant 1 Buffalo
Plant 2 Pittsburgh
Plant 3 Detroit
1
48
73
51
2
54
63
63
3
57
66
61
4
54
64
54
5
62
74
56
Sample mean
55
68
57
Sample variance
26
26.5
24.5
35
Textbook Example • Factor: Manufacturing plant • Treatments: Buffalo, Pittsburgh and Detroit • Experimental units: Managers • Response variable: Number of hours worked 36
Textbook Example • Step 1: Develop a hypothesis
:
: Not all population means are equal
where:
= mean number of hours worked per week by the managers at Plant 1
= mean number of hours worked per week by the managers at Plant 2
= mean number of hours worked per week by the managers at Plant 3
• Step 2: Choose the level of significance
0.05
37
Textbook Example • Step 3: Compute the Test Statistic: Mean Square Between Treatments:
5 5 5 555 68 57 60 555 15 5 55 60 5 68 60 5 57 60 490 490 SSTR 245 1 31
Mean Square Error: 5 1 26 5 1 26.5 5 1 24.5 308
308 25.667 15 3
38
Textbook Example Test Statistic:
245 9.55 25.667
• Rejection Rule: p-value Approach: Critical value Approach:
Reject if p-value 0.05
Reject if . 3.89
where the value of . 3.89 is based on an F distribution with 2 numerator and 12 denominator . 39
Textbook Example • Step 4: Determine whether to reject 1.
We reject the because . (or p-value 0.0033 0.05).
2.
We can conclude that the means number of hours worked per week by department managers are not the same at all 3 plants.
40
Multiple Comparison Procedures • Suppose that analysis of variance has provided statistical evidence to reject the null hypothesis of equal population means. • Fisher’s least significant difference (LSD) procedure can be used to determine where the differences occur. • Hypotheses: : :
• Test Statistic:
MSE 1 1
41
Multiple Comparison Procedures • Rejection Rule: p-value Approach: Critical value Approach:
Reject if p-value
Reject if /
where the value of / is based on a t distribution with degrees of freedom.
42
Textbook Example • Janet Reed would like to know if there is
any significant difference in the mean number of hours worked per week for the department managers at her three manufacturing plants (in Buffalo, Pittsburgh, and Detroit).
• Analysis of variance has provided statistical evidence to reject the null equal population means. significant difference (LSD) be used to determine where occur.
hypothesis of Fisher’s least procedure can the differences 43
Textbook Example • For 0.05, LSD for Plants 1 and 2: • Hypotheses (A):
:
• Rejection Rule:
Reject if . 2.179
• Test Statistic: • Conclusion:
:
| |
. ⁄⁄
4.0572 2.179
The mean number of hours worked at Plant 1 is not equal to the mean number worked at Plant 2. 44
Textbook Example • For 0.05, LSD for Plants 1 and 3: • Hypotheses (B):
:
:
• Rejection Rule:
Reject if . 2.179
• Test Statistic:
• Conclusion:
| |
. ⁄⁄
0.6242 2.179
There is no significant difference between the mean number of hours worked at Plant 1 and the mean number of hours worked at Plant 3. 45
Textbook Example • For 0.05, LSD for Plants 2 and 3: • Hypotheses (A):
:
• Rejection Rule:
Reject if . 2.179
• Test Statistic: • Conclusion:
:
| |
. ⁄⁄
3.4330 2.179
The mean number of hours worked at Plant 2 is not equal to the mean number worked at Plant 3. 46
Randomized Block Design • Experimental units are the objects of interest in the experiment. • A completely randomized design is an experimental design in which the treatments are randomly assigned to the experimental units.
• If the experimental units are heterogeneous, blocking can be used to form homogeneous groups, resulting in a randomized block design. 47
Randomized Block Design • ANOVA Procedure: • For a randomized block design the sum of squares total (SST) is partitioned into three groups: sum of squares due to treatments (SSTR), sum of squares due to blocks (SSBL), and sum of squares due to error (SSE).
• The total degrees of freedom, 1, are partitioned such that 1 degrees of freedom go to treatments, 1 go to blocks, and 1 1 go to the error term.
48
ANOVA Table for a Randomized Block Design Source of Variation
Sum of S...