1/2555 สมศักดิ์ ศิวดำรงพงศ์ somsaksi@sut.ac.th 525201 Statistics and Numerical Method Part I: Statistics Week IV: Decision Making (1 sample) 1/2555 สมศักดิ์ ศิวดำรงพงศ์ somsaksi@sut.ac.th
4-1 Statistical Inference Sampling Inference
4-2 Point Estimation
4-3 Hypothesis Testing Statistical hypothesis testing as the data analysis stage of a comparative experiment, in which the engineer is interested
Statistical Hypothesis Two side hypothesis One side hypothesis H0 : Null Hypothesis H1 : Alternative Hypothesis
Hypothesis Testing If this information is consistent with the hypothesis, then we will conclude that the hypothesis is true; If this information is inconsistent with the hypothesis, we will conclude that the hypothesis is false.
Type I and II Errors Reality Decision Weak Conclusion Ho TRUE Fail to Reject Ho or ACCEPT Ho REJECT Ho TYPE II ERROR TYPE I ERROR Probability , a Significance level Decision Probability , b Ho FALSE Reality THE PROBABILITY OF TYPE I ERROR IS OFTEN SET AT 5%. THE PROBABILITY OF TYPE II ERROR IS OFTEN SET AT 10% CONFIDENCE Probability ,1 – a Correct Decision POWER Probability, 1 – b Weak Conclusion Strong Conclusion
Decision criteria
Type I error;
Type II error;
sample size and critical region Reduce of critical region, alpha always increase Alpha and Beta are related, at remain sample size An increase in sample size will reduce both alpha and beta When the null hypothesis is false, beta increase as the true value of the parameter approaches the value hypothesized in the null hypothesis
P-Value P-Value is not the probability that the null hypothesis is false, nor is 1-P the probability that null hypothesis is true. The null hypothesis is either true or false, and so the proper interpretation of the P-value is in term of the risk of wrongly rejecting H0
4-4 Inference on the mean of a population; variance known
Reject H0 if the observed value of the test statistic z0 is either: or Fail to reject H0 if
Ex: 0=50, =2, =0.05, n=25 and sample average=51.3 H0: =50 and H1: ≠50 =0.05 (two tails), -z0.025=-1.96 and z0.025=1.96 z0=3.25 P=2[1-(3.25)]=0.0012 Since 0.0012<0.05 then reject H0 Test of mu = 50 vs not = 50 The assumed standard deviation = 2 N Mean SE Mean 95% CI Z P 25 51.300 0.400 (50.516, 52.084) 3.25 0.001
Ex: 0=50, =2, =0.05, n=16, 9, 4 and sample average=51.3 One-Sample Z Test of mu = 50 vs not = 50 The assumed standard deviation = 2 N Mean SE Mean 95% CI Z P 51.300 0.500 (50.320, 52.280) 2.60 0.009 9 51.300 0.667 (49.993, 52.607) 1.95 0.051 N Mean SE Mean 95% CI Z P 4 51.30 1.00 (49.34, 53.26) 1.30 0.194
Confidence interval on the mean
Confidence interval on the mean
4-5 Inference on the Mean of a Population, Variance Unknown
Inference on the Mean of a Population, Variance Unknown
Calculating P-value
Ex: sampling n=15, mean=0. 8375, s=0. 02456, =0 Ex: sampling n=15, mean=0.8375, s=0.02456, =0.05, test for exceed 0.82 H0: =0.82 and H1: >0.82 =0.05 (upper tail), t0=2.72 P=0.008 Since 0.008<0.05 then reject H0 Test of mu = 0.82 vs > 0.82 95% Lower Variable N Mean StDev SE Mean Bound T P C1 15 0.83724 0.02456 0.00634 0.82607 2.72 0.008
4-7 Inference on a Population Proportion (Binomial) We will consider testing:
Inference on a Population Proportion (Binomial)
Ex: sampling 200 samples and found 4 defects Ex: sampling 200 samples and found 4 defects. Please check the defect rate not exceed 0.05 with =0.05 H0: p=0.05 and H1: p<0.05 =0.05 (lower tail), z0=-1.95 P=(-1.95)=0.0256 Since 0.0256<0.05 then reject H0 Test of p = 0.05 vs p < 0.05 95% Upper Sample X N Sample p Bound Z-Value P-Value 1 4 200 0.020000 0.036283 -1.95 0.026
Power and Sample Size 1 sample, z-test 2-side, power=, significant level=, difference==-0 1-side, power=, significant level=, difference==-0
1-Sample Z Test Testing mean = null (versus not = null) Calculating power for mean = null + difference Alpha = 0.05 Assumed standard deviation = 2 Sample Target Difference Size Power Actual Power 1 43 0.9 0.906375
Sample size and decision making In general, if n 30, the sample variance s2 will be close to σ2 for most samples
Power and Sample Size Sample and confident interval
Power and Sample Size T-test Operating Characteristic (OC curves)
Power and Sample Size 1 proportion test