1.06k likes | 1.7k Views
Schaum’s Outline Probability and Statistics Chapter 7 HYPOTHESIS TESTING presented by Professor Carol Dahl Examples by Alfred Aird Kira Jeffery Catherine Keske Hermann Logsend Yris Olaya. Outline of Topics. Topics Covered. Statistical Decisions Statistical Hypotheses
E N D
Schaum’s Outline Probability and Statistics Chapter 7 HYPOTHESIS TESTING presented by Professor Carol Dahl Examples by Alfred Aird Kira Jeffery Catherine Keske Hermann Logsend Yris Olaya
Outline of Topics Topics Covered • Statistical Decisions • Statistical Hypotheses • Null Hypotheses • Tests of Hypotheses • Type I and Type II Errors • Level of Significance • Tests Involving the Normal Distribution • One and Two – Tailed Tests • P – Value
Outline of Topics (Continued) • Special Tests of Significance • Large Samples • Small Samples • Estimation Theory/Hypotheses Testing Relationship • Operating Characteristic Curves and Power of a Test • Fitting Theoretical Distributions to Sample Frequency Distributions • Chi-Square Test for Goodness of Fit
“The Truth Is Out There”The Importance of Hypothesis Testing • Hypothesis testing • helps evaluate models based upon real data • enables one to build a statistical model • enhances your credibility as • analyst • economist
Statistical Decisions • Innocent until proven guilty principle • Want to prove someone is guilty • Assume the opposite or status quo - innocent • Ho: Innocent • H1: Guilty • Take subsample of possible information • If evidence not consistent with innocent - reject • Person not pronounced innocent but not guilty
Statistical Decisions • Status quo innocence = null hypothesis • Evidence = sample result • Reasonable doubt = confidence level
Statistical Decisions • Eg. Tantalum ore deposit • feasible if quality > 0.0600g/kg with 99% confidence • 100 samples collected from large deposit at random. • Sample distribution • mean of 0.071g/kg • standard deviation 0.0025g/kg.
Statistical Decisions • Should the deposit be developed? • Evidence = 0.071 (sample mean) • Reasonable doubt = 99% • Status quo = do not develop the deposit • Ho: < 0.0600 • H1: > 0.0600
Statistical Hypothesis • General Principles • Inferences about population using sample statistic • Prove A is true by assuming it isn’t true • Results of experiment (sample) compared with model • If results of model unlikely, reject model • If results explained by model, do not reject
Statistical Hypothesis Area B z 0 A Event A fairly likely, model would be retained Event B unlikely, model would be rejected
Statistical Decisions • Should the deposit be developed? • Evidence = 0.071 (sample mean) • Reasonable doubt = 99% • Status quo = do not develop the deposit • Ho: = 0.0600 • H1: > 0.0600 • How likely Ho given = 0.071
Need Sampling Statistic • Need statistic with • population parameter • estimate for population parameter • its distribution
Need Sampling Statistic • Population Normal - Two Choices • Small Sample <30 • Known Variance Unknown Variance N(0,1) tn-1
Need Sampling Statistic • Population Not-Normal • Large Sample • Known Variance Unknown Variance N(0,1) N(0,1) Doesn’t matter if know variance of not If population is finite sampling no replacement need adjustment
Normal Distribution 27 X~N(0,1) =0 SD=1 (68%) SD=2 (95%) SD=3 (99.7%)
Statistical Decisions • Should the deposit be developed? • Evidence: 0.071 (sample mean) • 0.0025g/kg (sample variance) • 0.05 (sample standard deviation) • Reasonable doubt = 99% • Status quo = do not develop the deposit • Ho: = 0.0600 • H1: > 0.0600 • One tailed test • How likely Ho given = 0.071
Hypothesis test • Evidence: 0.071 (sample mean) • 0.05g/kg (sample standard deviation) • Reasonable doubt = 99% • Status quo = do not develop the deposit • Ho: = 0.0600 • H1: > 0.0600
Statistical Hypothesis Eg. Z = (0.071 – 0.0600)/ (0.05/ 100) = 2.2 Conclusion: Don’t reject Ho , don’t develop deposit Zc=2.33 2.2
Null Hypothesis • Hypotheses cannot be proven • reject or fail to reject • based on likelihood of event occurring • null hypothesis is not accepted
Test of Hypotheses Maple Creek Mine and Potaro Diamond field in Guyana • Mine potential for producing large diamonds • Experts want to know true mean carat size produced • True mean said to be 4 carats • Experts want to know if true with 95% confidence • Random sample taken • Sample mean found to be 3.6 carats • Based on sample, is 4 carats true mean for mine?
Tests of Hypotheses • Tests referred to as: • “Tests of Hypotheses” • “Tests of Significance” • “Rules of Decision”
Types of Errors Ho: µ = 4 (Suppose this is true) H1: µ 4 Two tailed test Choose = 0.05 Sample n = 100 (assume X is normal), = 1
Type I error () –reject true Ho: µ = 4 suppose true /2 /2
Type II Error (ß) - Accept False μ=4 μ=6 0 2 • Ho: µ = 4 not true • µ = 6 true • X-µ not mean 0 but mean 2 ß
Lower Type I What happens to Type II • μ=4 • μ=6 • 0 • 2 • Ho: µ = 4 not true • µ = 6 true ß
Higher µWhat happens to Type II? • μ=4 • μ=7 • 0 • 3 • Ho: µ = 4 not true • µ = 7 true • X-µ not mean 0 but mean 3 ß
Type I and Type II Errors • Two types of errors can occur in hypothesis testing • To reduce errors, increase sample size when possible
To Reduce Errors • Increase sample size when possible • Population, n = 5, 10, 20
Error Examples • Type I Error – rejecting a true null hypothesis • Convicting an innocent person • Rejecting true mean carat size is 4 when it is • Type II Error – not rejecting a false null hypothesis • Setting a guilty person free • Not rejecting mean carat size is 4 when it’s not
Level of Significance () • α = max probability we’re willing to risk Type I Error • = tail area of probability density function • If Type I Error’s “cost” high, choose α low • α defined before hypothesis test conducted • α typically defined as 0.10, 0.05 or 0.01 • α = 0.10 for 90% confidence of correct test decision • α = 0.05 for 95% confidence of correct test decision • α = 0.01 for 99% confidence of correct test decision
Diamond Hypothesis Test Example Ho: µ = 4 H1: µ 4 Choose α = 0.01 for 99% confidence Sample n = 100, = 1 X = 3.6, -Zc = - 2.575, Zc = 2.575 -2.575 2.575 .005 .005
21 Example Continued 1 • Observed not “significantly” different from expected • Fail to reject null hypothesis • We’re 99% confident true mean is 4 carats
Tests Involving the t Distribution • Billy Ray has inherited large, 25,000 acre homestead • Located on outskirts of Murfreesboro, Arkansas, near: • Crater of Diamonds State Park • Prairie Creek Volcanic Pipe • Land now used for • agricultural • recreational • No official mining has taken place
Case Study in Statistical Analysis Billy Ray’s Inheritance • Billy Ray must now decide upon land usage • Options: • Exploration for diamonds • Conservation • Land biodiversity and recreation • Agriculture and recreation • Land development
Consider Costs and Benefits of Mining • Cost and Benefits of Mining • Opportunity cost • Excessive diamond exploration damages land’s value • Exploration and Mining Costs • Benefit • Value of mineral produced
Consider Costs and Benefits of Mining • Cost and Benefits of Mining • Sample for geologic indicators for diamonds • kimberlite or lamporite • larger sample more likely to represent “true population” • larger sample will cost more
How to decide one tailed or two tailed • One tailed test • Do we change status quo only if its bigger than null • Do we change status quo only if its smaller than null • Two tailed test • Change status quo if its bigger of if it smaller
Tests of Mean • Normal or t • population normal • known variance • small sample Normal population normal unknown variance small sample t large population Normal
Difference Normal and t t “fatter” tail than normal bell-curve
Hypothesis and Sample • Need at least 30 g/m3 mine • Null hypothesis Ho: µ = 20 • Alternative hypothesis H1: ? • Sample data: n=16 (holes drilled) • X close to normal • X =31 g/m³ • variance (ŝ2/n)=0.286 g/m³
Normal or t? • One tailed • Null hypothesis Ho: µ = 30 • Alternative hypothesis H1: µ > 30 • Sample data: n = 16 (holes drilled) • X = 31 g/m³ • variance (ŝ2) = 4.29 g/m³ = 4.29 • standard deviation ŝ = 2.07 • small sample, estimated variance, X close to normal • not exactly t but close if X close to normal
Tests Involving the t Distribution • tn-1 = X - µ • ŝ/n t16-1 =0 Reject 5% tc=1.75
Tests Involving the t Distribution • tn-1 = X - µ = (31 - 30) = 1.93 • ŝ/n 2.07/ 16 t16-1 =0 Reject 5% tc=1.75
Wells produces oil • X= API Gravity • approximate normal with mean 37 • periodically test to see if the mean has changed • too heavy or too light revise contract • Ho: • H1: • Sample of 9 wells, X= 38, ŝ2 = 2 • What is test statistic? • Normal or t?
Two tailed t test on mean • tn-1 = X - µ • ŝ/n =0 Reject /2% Reject /2% tc tc
Two tailed t test on mean • Ho: µ= 37 • H1: µ 37 • Sample of 9 wells, X= 38, ŝ2 = 2, = 10% • tn-1 = X - µ = (38 – 37) = 1.5 • ŝ/n 2/ 9
P-values - one tailed test • Level of significance for a sample statistic under null • Largest for which statistic would reject null • t16-1 = X - µ = (31 - 30) = 1.93 • ŝ/n 2.07/ 16 P=0.04 tinv(1,87,15,1)
P-value two tailed test • Ho: µ= 37 • H1: µ 37 • Sample of 9 wells, X= 38, ŝ2 = 2, = 10% • tn-1 = X - µ = (38 – 37) = 1.5 • ŝ/n 2/ 9 =TDIST(1.5,8,2) = 0.172
Formal Representation of p-Values • p-Value < = Reject Ho • p-Value> = Fail to reject Ho
More tests • Survey: - Ranking refinery managers • Daily refinery production • Sample two refineries of 40 and 35 1000 b/cd • First refinery: mean = 74, stand. dev. = 8 • Second refinery: mean = 78, stand. dev. = 7 • Questions: difference of means? • variances? • differences of variances • Again Statistics Can Help!!!!