Presentation is loading. Please wait.

Presentation is loading. Please wait.

Experimental Statistics - week 3

Similar presentations


Presentation on theme: "Experimental Statistics - week 3"— Presentation transcript:

1 Experimental Statistics - week 3
Chapter 8: Inferences about More Than 2 Population Central Values

2 PC SAS on Campus Library BIC Student Center SAS Learning Edition $125

3 Hypothetical Sample Data
Scenario A Scenario B Pop Pop 2 Pop Pop 2 For one scenario, | t | = 1.17 For the other scenario, | t | = 3.35

4 In general, for 2-sample t-tests:
To show significance, we want the difference between groups to be ___________ compared to the variability within groups

5 Completely Randomized Design 1-Factor Analysis of Variance (ANOVA)
Setting (Assumptions): - t populations - populations are normal denote the mean and variance of the ith population - mutually independent random samples are taken from the populations - the sample sizes to not have to all be equal

6 1-Factor ANOVA m1 s m2 s mk s . . .

7 Question: Notes: - not directional i.e. no “1-sided / 2-sided” issues
- alternative doesn’t say that all means are distinct

8 Completely Randomized Design 1-Factor Analysis of Variance
Example data setup where t = 5 and n = 4

9 Notation:

10 A Sum-of-Squares Identity
Note: This is for the case in which all sample sizes are equal ( n ) The 3 sums of squares measure: - variability between samples - variability within samples - total variability Question: Which measures what?

11 In words: Total SS = SS between samples + within sample SS where
TSS(total SS) = total sample variability SSB(SS between samples) = variability due to factor effects SSW(within sample SS) = variability due to uncontrolled error Note: Formula for unequal sample sizes given on page 388

12 Pop Pop Pop

13 Pop Pop Pop

14 Recall: For 2-sample t-test, we tested using
To show significance, we want the difference between groups compared to the variability within groups

15 Note: Our test statistic for testing will be of the form This has an F distribution Question: What type of F values lead you to believe the null is NOT TRUE?

16 Analysis of Variance Table
Note:

17 Note:

18 CAR DATA Example For this analysis, 5 gasoline types (A - E) were to be tested. Twenty cars were selected for testing and were assigned randomly to the groups (i.e. the gasoline types). Thus, in the analysis, each gasoline type was tested on 4 cars. A performance-based octane reading was obtained for each car, and the question is whether the gasolines differ with respect to this octane reading.     A 91.7 91.2 90.9 90.6 B 91.7 91.9 90.9 C 92.4 91.2 91.6 91.0 D 91.8 92.2 92.0 91.4 E 93.1 92.9 92.4 means

19 ANOVA Table Output - car data
Source SS df MS F p-value Between   samples Within Totals

20 F-table -- p.1106

21 Extracted from From Ex. 8.2, page 390-391
3 Methods for Reducing Hostility 12 students displaying similar hostility were randomly assigned to 3 treatment methods. Scores (HLT) at end of study recorded. Method Method Method Test:

22 ANOVA Table Output - hostility data
Source SS df MS F p-value Between   samples Within Totals

23 SPSS ANOVA Table for Hostility Data
     SPSS ANOVA Table for Hostility Data

24 ANOVA Models Note: Example: Population has mean m = 5.
Consider the random sample

25 For 1-factor ANOVA

26 Alternative form of the 1-Factor ANOVA Model
General Form of Model: Alternative form of the 1-Factor ANOVA Model (pages ) - random errors follow a Normal distribution, are independently distributed, and have zero mean and constant variance -- i.e. variability does not change from group to group

27

28 Analysis of Variance Table
Recall: Note: - if no factor effects, we expect F _____ - if factor effects, we expect F _____

29 The CAR data set as SAS needs to see it:   A A A A B B B C C C C D D D D E E E

30 SAS file for CAR data Case 1: Data within SAS FILE : DATA one;
DATA one; INPUT gas$ octane; DATALINES; A A . E ; PROC GLM; CLASS gas; MODEL octane=gas; TITLE 'Gasoline Example - Completely Randomized Design'; MEANS gas; RUN; PROC MEANS mean var; class gas;

31 The SAS Output for CAR data:
Gasoline Example - Completely Randomized Design General Linear Models Procedure Dependent Variable: OCTANE Sum of Mean Source DF Squares Square F Value Pr > F Model Error Corrected Total R-Square C.V Root MSE OCTANE Mean    Source DF Type I SS Mean Square F Value Pr > F GAS Textbook Format for ANOVA Table Output - car data Source SS df MS F p-value Between   samples Within Totals

32 Problem 1. Descriptive Statistics for CAR Data
The MEANS Procedure Analysis Variable : octane Mean Std Dev Minimum Maximum ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ

33 Problem 3. Descriptive Statistics by Gasoline  
gas=A   The MEANS Procedure   Analysis Variable : octane   Mean Std Dev Minimum Maximum ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ    gas=B    gas=C Mean Std Dev Minimum Maximum   gas=D Analysis Variable : octane gas=E

34

35 Question 1: Which gasolines are different?
Question 2: Why didn’t we just do t-tests to compare all combinations of gasolines? i.e. compare A vs B A vs C D vs E

36 Simulation: i.e. using computer to generate data under certain known conditions and observing the outcomes

37 Setting: Simulation Experiment: Question:
Normal population with: m = 20 and s = 5 Simulation Experiment: Generate 2 samples of size n = 10 from this population and run t-test to compare sample means. i.e test: Question: What do we expect to happen?

38 (which is what we expected)
Simulation Results: t-test procedure: (a = .05) Reject H0 if | t | > 2.101 t = .235 so we do not reject H0 (which is what we expected)

39 Simulation results: Now - suppose we obtain 10 samples and test
Note: Comparing means 4 vs 5 we get t = 2.33 -- i.e. we reject the null (but it’s true!!)

40 Suppose we run all possible t-tests at significance level a =
Suppose we run all possible t-tests at significance level a = .05 to compare 10 sample means of size n = 10 from this population - it can be shown that there is a 63% chance that at least one pair of means will be declared significantly different from each other F-test in ANOVA controls overall significance level.

41 Probability of finding at least 2 of k means significantly different using multiple t-tests at the a = .05 level when all means are actually equal. k Prob.

42 Fisher’s Least Significant Difference (LSD)
Protected LSD: Preceded by an F-test for overall significance. Only use the LSD if F is significant. X Unprotected: Not preceded by an F-test (like individual t-tests).

43 Gasoline Example - Completely Randomized Design -- All 5 Gasolines
The GLM Procedure Dependent Variable: octane Sum of Source DF Squares Mean Square F Value Pr > F Model Error Corrected Total R-Square Coeff Var Root MSE octane Mean Source DF Type I SS Mean Square F Value Pr > F gas


Download ppt "Experimental Statistics - week 3"

Similar presentations


Ads by Google