Download presentation
Presentation is loading. Please wait.
Published byTheodora Russell Modified over 9 years ago
1
1 The future is a vain hope, the past is a distracting thought. Uphold our loving kindness at this instant, and be committed to our duties and responsibilities right now.
2
2 Applied Statistics Using SAS and SPSS Topic: Hypothesis Testing By Prof Kelly Fan, Cal State Univ, East Bay
3
3 Hypothesis Testing A statistical hypothesis is an assertion or conjecture concerning one or more populations. Agenda: 1.Types of tests 2.Types of errors 3.P-value 4.Summary of tests 5.Assumption checking
4
4
5
5
6
6 Types of Tests
7
7
8
8
9
9 Good! Good!(Correct!) H 0 trueH 0 false Type II Error, or “ Error” Type I Error, or “ Error” Good! Good!(Correct) we accept H 0 we reject H 0 Types of Errors
10
10 = Probability of Type I error = P(rej. H 0 |H 0 true) = Probability of Type II error = P(acc. H 0 |H 0 false) We often preset called significance level. The value of depends on the specifics of the H 1 (and most often in the real world, we don’t know these specifics).
11
11 C=14 1 EXAMPLE: H 0 : < 100 H 1 : >100 Suppose the Critical Value = 141: =100 X
12
12 = P (X < 141|H 0 false) 141 What is ? = P (X < 141/ = 150).3594 =.3594 = 150 141 = P (X < 141/ = 160).2236 =.2236 = 160 141 = P (X < 141/ = 170).1230 =.1230 = 170 141 = P (X < 141/ = 180) = 180 These are values corresp.to a value of 25 for the Std. Dev. of X =.0594
13
13 Note: Had been preset at.025 (instead of.05), C would have been 149 (and would be larger); had been preset at.10, C would have been 132 and would be smaller. and “trade off”.
14
14 P Value Idea: The largest “risk” we pay to reject H0 (the observed type I error rate) (or the observed significance level) When will we reject Ho ? What is the formula to calculate the largest risk?
15
15 Steps of Hypothesis Tests 1.Set up Ho and Ha properly 2.Preset level (the significant level) 3.Select an appropriate test 4.Calculate its p-value 5.Reject Ho if p-value < or = the significant level; otherwise fail to reject Ho
16
16 Set Up Hypothesis Properly Conjecture: The fraction of defective product in a certain process is at most 10%. Which error is more seriously? Incorrectly claim this conjecture is true? false? The “=“ sign must be in Ho
17
17 One Population
18
18 Two Populations
19
19 Assumption Checking 1.Tests/graphs for normality 2.Tests for equal variances
20
20 Example: Mortar Strength The tension bond strength of cement mortar is an important characteristic of the product. An engineer is interested in comparing the strength of a modified formulation in which polymer latex emulsions have been added during mixing to the strength of the unmodified mortar. The experimenter has collected 10 observations on strength for the modified formulation and another 10 observations for the unmodified formulation.
21
21 Example: Mortar Strength ModifiedUnmodified 16.8517.50 16.4017.63 17.2118.25 16.3518.00 16.5217.86 17.0417.75 16.9618.22 17.1517.90 16.5917.96 16.5718.15
22
22 SAS/SPSS Data Input SPSS: One variable one column in the work sheet SAS: One variable one name
23
23 Normality Tests Tests for Normality Test --Statistic--- -----p Value------ Shapiro-Wilk W 0.918255 Pr < W 0.0917 Kolmogorov-Smirnov D 0.134926 Pr > D >0.1500 Cramer-von Mises W-Sq 0.081542 Pr > W-Sq 0.1936 Anderson-Darling A-Sq 0.537514 Pr > A-Sq 0.1503 SAS: PROC UNIVARIATE DATA=** NORMAL PLOT;
24
24 Normality Tests SPSS: Analyze >> Descriptive Statistics >> Explore >> Plots, Normality plots with tests
25
25 Two-sample t Tests and Equal-variance Tests SAS: PROC TTEST DATA=** ;
26
26 SPSS: equal-variance tests: Homework for ST3900 students SPSS: two-sample t tests as below Two-sample t Tests and Equal-variance Tests
27
27 Research Question A researcher claims that a new series of math courses for elementary school is more effective than the current one. Two (1 st grade) classes of students are selected to perform an experiment to verify this claim. How would you conduct the experiment to avoid confounding variables as much as possible?
28
28 Paired Samples If the same set of sources are used to obtain data representing two populations, the two samples are called paired. The data might be paired: As a result of the data from certain “before” and “after” studies From matching two subjects to form “matched pairs”
29
29 Tests for Paired Samples Calculate the pair differences Proceed as in one sample case Notes: SAS: all variables must be included in data SPSS: create/calculate all variables we need
30
30 Review: Confidence Interval
31
31
32
32 One Population
33
33 Two Populations
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.