32
525201 Statistics and Numerical Method Part I: Statistics Week IV: Decision Making (1 sample) 1/2555 สสสสสสสส สสสสสสสสสสสส [email protected] 1

525201 Statistics and Numerical Method Part I: Statistics Week IV: Decision Making (1 sample) 1/2555 สมศักดิ์ ศิวดำรงพงศ์ [email protected] 1

Embed Size (px)

Citation preview

Page 1: 525201 Statistics and Numerical Method Part I: Statistics Week IV: Decision Making (1 sample) 1/2555 สมศักดิ์ ศิวดำรงพงศ์ somsaksi@sut.ac.th 1

1

525201Statistics and Numerical Method

Part I: StatisticsWeek IV: Decision Making

(1 sample)

1/2555 สมศั�กดิ์�� ศั�วดิ์�รงพงศั�

[email protected]

Page 2: 525201 Statistics and Numerical Method Part I: Statistics Week IV: Decision Making (1 sample) 1/2555 สมศักดิ์ ศิวดำรงพงศ์ somsaksi@sut.ac.th 1

2

4-1 Statistical Inference

Sampling

Inference

Page 3: 525201 Statistics and Numerical Method Part I: Statistics Week IV: Decision Making (1 sample) 1/2555 สมศักดิ์ ศิวดำรงพงศ์ somsaksi@sut.ac.th 1

3

4-2 Point Estimation

Page 4: 525201 Statistics and Numerical Method Part I: Statistics Week IV: Decision Making (1 sample) 1/2555 สมศักดิ์ ศิวดำรงพงศ์ somsaksi@sut.ac.th 1

4

4-3 Hypothesis TestingStatistical hypothesis testing as

the data analysis stage of a comparative experiment, in which the engineer is interested

Page 5: 525201 Statistics and Numerical Method Part I: Statistics Week IV: Decision Making (1 sample) 1/2555 สมศักดิ์ ศิวดำรงพงศ์ somsaksi@sut.ac.th 1

5

Statistical HypothesisTwo side hypothesis

One side hypothesis

H0 : Null HypothesisH1 : Alternative Hypothesis

Page 6: 525201 Statistics and Numerical Method Part I: Statistics Week IV: Decision Making (1 sample) 1/2555 สมศักดิ์ ศิวดำรงพงศ์ somsaksi@sut.ac.th 1

6

Hypothesis TestingIf 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.

Page 7: 525201 Statistics and Numerical Method Part I: Statistics Week IV: Decision Making (1 sample) 1/2555 สมศักดิ์ ศิวดำรงพงศ์ somsaksi@sut.ac.th 1

7

Type I and II Errors

Ho TRUE

Fail to Reject Ho or

ACCEPT Ho

REJECT Ho

TYPE II ERROR

TYPE I ERRORProbability , aSignificance level

DecisionDecision

Probability , b

Ho FALSERealityReality

THE PROBABILITY OF TYPE I ERROR IS OFTEN SET AT 5%.THE PROBABILITY OF TYPE II ERROR IS OFTEN SET AT 10%

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 – aCorrect Decision

POWER

Probability, 1 – bCorrect Decision

Weak Conclusion

Strong Conclusion

Page 8: 525201 Statistics and Numerical Method Part I: Statistics Week IV: Decision Making (1 sample) 1/2555 สมศักดิ์ ศิวดำรงพงศ์ somsaksi@sut.ac.th 1

8

Decision criteria

Page 9: 525201 Statistics and Numerical Method Part I: Statistics Week IV: Decision Making (1 sample) 1/2555 สมศักดิ์ ศิวดำรงพงศ์ somsaksi@sut.ac.th 1

9

Type I error;

Page 10: 525201 Statistics and Numerical Method Part I: Statistics Week IV: Decision Making (1 sample) 1/2555 สมศักดิ์ ศิวดำรงพงศ์ somsaksi@sut.ac.th 1

10

Type II error;

Page 11: 525201 Statistics and Numerical Method Part I: Statistics Week IV: Decision Making (1 sample) 1/2555 สมศักดิ์ ศิวดำรงพงศ์ somsaksi@sut.ac.th 1

11

sample size and critical region

1.Reduce of critical region, alpha always increase2.Alpha and Beta are related, at remain sample size3.An increase in sample size will reduce both alpha

and beta4.When the null hypothesis is false, beta increase

as the true value of the parameter approaches the value hypothesized in the null hypothesis

Page 12: 525201 Statistics and Numerical Method Part I: Statistics Week IV: Decision Making (1 sample) 1/2555 สมศักดิ์ ศิวดำรงพงศ์ somsaksi@sut.ac.th 1

12

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

Page 13: 525201 Statistics and Numerical Method Part I: Statistics Week IV: Decision Making (1 sample) 1/2555 สมศักดิ์ ศิวดำรงพงศ์ somsaksi@sut.ac.th 1

13

4-4 Inference on the mean of a population; variance known

Page 14: 525201 Statistics and Numerical Method Part I: Statistics Week IV: Decision Making (1 sample) 1/2555 สมศักดิ์ ศิวดำรงพงศ์ somsaksi@sut.ac.th 1

14

Reject H0 if the observed value of the test statistic z0 is either:

or

Fail to reject H0 if

Page 15: 525201 Statistics and Numerical Method Part I: Statistics Week IV: Decision Making (1 sample) 1/2555 สมศักดิ์ ศิวดำรงพงศ์ somsaksi@sut.ac.th 1

15

Page 16: 525201 Statistics and Numerical Method Part I: Statistics Week IV: Decision Making (1 sample) 1/2555 สมศักดิ์ ศิวดำรงพงศ์ somsaksi@sut.ac.th 1

16

Ex: 0=50, =2, =0.05, n=25 and sample average=51.3H0: =50 and H1: ≠50=0.05 (two tails), -z0.025=-1.96

and z0.025=1.96z0=3.25P=2[1-(3.25)]=0.0012Since 0.0012<0.05 then reject H0Test of mu = 50 vs not = 50The assumed standard deviation = 2

N Mean SE Mean 95% CI Z P25 51.300 0.400 (50.516, 52.084) 3.25 0.001

Page 17: 525201 Statistics and Numerical Method Part I: Statistics Week IV: Decision Making (1 sample) 1/2555 สมศักดิ์ ศิวดำรงพงศ์ somsaksi@sut.ac.th 1

17

Ex: 0=50, =2, =0.05, n=16, 9, 4 and sample average=51.3

One-Sample Z

Test of mu = 50 vs not = 50The assumed standard deviation = 2

N Mean SE Mean 95% CI Z P16 51.300 0.500 (50.320, 52.280) 2.60

0.009

N Mean SE Mean 95% CI Z P9 51.300 0.667 (49.993, 52.607) 1.95 0.051

N Mean SE Mean 95% CI Z P4 51.30 1.00 (49.34, 53.26) 1.30 0.194

Page 18: 525201 Statistics and Numerical Method Part I: Statistics Week IV: Decision Making (1 sample) 1/2555 สมศักดิ์ ศิวดำรงพงศ์ somsaksi@sut.ac.th 1

18

Confidence interval on the mean

Page 19: 525201 Statistics and Numerical Method Part I: Statistics Week IV: Decision Making (1 sample) 1/2555 สมศักดิ์ ศิวดำรงพงศ์ somsaksi@sut.ac.th 1

19

Confidence interval on the mean

Page 20: 525201 Statistics and Numerical Method Part I: Statistics Week IV: Decision Making (1 sample) 1/2555 สมศักดิ์ ศิวดำรงพงศ์ somsaksi@sut.ac.th 1

20

4-5 Inference on the Mean of a Population, Variance Unknown

Page 21: 525201 Statistics and Numerical Method Part I: Statistics Week IV: Decision Making (1 sample) 1/2555 สมศักดิ์ ศิวดำรงพงศ์ somsaksi@sut.ac.th 1

21

Inference on the Mean of a Population, Variance Unknown

Page 22: 525201 Statistics and Numerical Method Part I: Statistics Week IV: Decision Making (1 sample) 1/2555 สมศักดิ์ ศิวดำรงพงศ์ somsaksi@sut.ac.th 1

22

Calculating P-value

Page 23: 525201 Statistics and Numerical Method Part I: Statistics Week IV: Decision Making (1 sample) 1/2555 สมศักดิ์ ศิวดำรงพงศ์ somsaksi@sut.ac.th 1

23

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.72P=0.008Since 0.008<0.05 then reject H0

Test of mu = 0.82 vs > 0.82

95% LowerVariable N Mean StDev SE Mean Bound T PC1 15 0.83724 0.02456 0.00634 0.82607 2.72 0.008

Page 24: 525201 Statistics and Numerical Method Part I: Statistics Week IV: Decision Making (1 sample) 1/2555 สมศักดิ์ ศิวดำรงพงศ์ somsaksi@sut.ac.th 1

24

4-7 Inference on a Population Proportion (Binomial)

We will consider testing:

Page 25: 525201 Statistics and Numerical Method Part I: Statistics Week IV: Decision Making (1 sample) 1/2555 สมศักดิ์ ศิวดำรงพงศ์ somsaksi@sut.ac.th 1

25

Inference on a Population Proportion (Binomial)

Page 26: 525201 Statistics and Numerical Method Part I: Statistics Week IV: Decision Making (1 sample) 1/2555 สมศักดิ์ ศิวดำรงพงศ์ somsaksi@sut.ac.th 1

26

Ex: sampling 200 samples and found 4 defects. Please check the defect rate not exceed 0.05 with =0.05H0: p=0.05 and H1: p<0.05=0.05 (lower tail), z0=-1.95P=(-1.95)=0.0256Since 0.0256<0.05 then reject H0

Test of p = 0.05 vs p < 0.05

95% UpperSample X N Sample p Bound Z-Value P-Value1 4 200 0.020000 0.036283 -1.95 0.026

Page 27: 525201 Statistics and Numerical Method Part I: Statistics Week IV: Decision Making (1 sample) 1/2555 สมศักดิ์ ศิวดำรงพงศ์ somsaksi@sut.ac.th 1

27

Power and Sample Size1 sample, z-test2-side, power=, significant

level=, difference==-0

1-side, power=, significant level=, difference==-0

Page 28: 525201 Statistics and Numerical Method Part I: Statistics Week IV: Decision Making (1 sample) 1/2555 สมศักดิ์ ศิวดำรงพงศ์ somsaksi@sut.ac.th 1

28

1-Sample Z Test

Testing mean = null (versus not = null)Calculating power for mean = null + differenceAlpha = 0.05 Assumed standard deviation = 2

Sample TargetDifference Size Power Actual Power 1 43 0.9 0.906375

Page 29: 525201 Statistics and Numerical Method Part I: Statistics Week IV: Decision Making (1 sample) 1/2555 สมศักดิ์ ศิวดำรงพงศ์ somsaksi@sut.ac.th 1

29

Sample size and decision making

In general, if n 30, the sample variance s2 will be close to σ2 for most samples

Page 30: 525201 Statistics and Numerical Method Part I: Statistics Week IV: Decision Making (1 sample) 1/2555 สมศักดิ์ ศิวดำรงพงศ์ somsaksi@sut.ac.th 1

30

Power and Sample SizeSample and confident interval

Page 31: 525201 Statistics and Numerical Method Part I: Statistics Week IV: Decision Making (1 sample) 1/2555 สมศักดิ์ ศิวดำรงพงศ์ somsaksi@sut.ac.th 1

31

Power and Sample SizeT-testOperating Characteristic (OC

curves)

Page 32: 525201 Statistics and Numerical Method Part I: Statistics Week IV: Decision Making (1 sample) 1/2555 สมศักดิ์ ศิวดำรงพงศ์ somsaksi@sut.ac.th 1

32

Power and Sample Size1 proportion test