Lecture 9. HYPOTHESIS TESTING Lecture 9. HYPOTHESIS TESTING

 Statistical Hypothesis  Error Types  T-test for Mean  Z-test for Population  Chi-sq test for Variance

PROBABILITY & STATISTICS – Bui Duong Hai – NEU – www.mfe.edu.vn/buiduonghai

1

 [1] Chapter 9 + 11  pp. 382 – 432; 488 - 491

9.1. Statistical Hypothesis 9.1. Statistical Hypothesis

 Hypothesis: statement about statistical issue  Testing: test for the “True” or “False” of hypothesis  Example:

PROBABILITY & STATISTICS – Bui Duong Hai – NEU – www.mfe.edu.vn/buiduonghai

2

 Government reports that average income is $2400  Expected value of price is $10  Mean of consumption was 2 mil.VND

Hypotheses Pair Hypotheses Pair

 For parameter

∶Null hypothesis :Alternative hypothesis

 There are 3 types

 one-sided, upper tail

 one-sided, lower tail

 two-sided, two tails

PROBABILITY & STATISTICS – Bui Duong Hai – NEU – www.mfe.edu.vn/buiduonghai

3

: ≤ : > : ≥ : < : = : ≠

Example Example

Ex. Testing the statement that “average income of habitant is $2000”

0: = 2000 : the statement is True 1: ≠ 2000 : the statement is False

PROBABILITY & STATISTICS – Bui Duong Hai – NEU – www.mfe.edu.vn/buiduonghai

4

Example 9.1. What is hypotheses pair for the following statements: (a) The average income of habitant is greater than 2000 (b) The proportion of male in customers is less than 50% (c) The variability of price is more than 20 USD2 (d) The dispersion of price is less than 20 USD

Decision & Errors Decision & Errors

 Decision: Reject or Accept H0  Two types of Errors

Error type 1: Reject the True hypothesis Error type 2: Accept the False hypothesis

Decision

H0 is True

H0 is False

Type 2 error

Accept H0 Correct decision

Type 1 error

Correct decision

Reject H0

 Allow a given Type 1 error probability, minimize Type 2

error probability

PROBABILITY & STATISTICS – Bui Duong Hai – NEU – www.mfe.edu.vn/buiduonghai

5

Testing Procedure Testing Procedure

 Probability for Type 1 Error: Significant Level,  Calculate Critical value correspond to  Indicate Reject Area for H0  From sample: calculate Statistical value  Rule:

 Statistical value is in the Reject Area: Reject H0  Stat. value is not in the Reject Area: Not Reject H0

PROBABILITY & STATISTICS – Bui Duong Hai – NEU – www.mfe.edu.vn/buiduonghai

6

(Not enough evident to reject H0)

Testing Procedure Testing Procedure

 Step 1: Setting up Hypothesis pair, significant level  Step 2: Data gathering  Step 3: Calculating statistical value  Step 4: Comparing statistical value with critical value  Step 5: Concluding about the hypothesis

 There is Probability value (P-value) of the test

PROBABILITY & STATISTICS – Bui Duong Hai – NEU – www.mfe.edu.vn/buiduonghai

7

 − < :reject  − > : not reject

9.2. T-test for Mean 9.2. T-test for Mean

 Testing population mean with a value  Significant level:  Hypotheses pairs

: ≤ : > : ≥ : < : = : ≠

̅ /

 Only one Statistical value: =

PROBABILITY & STATISTICS – Bui Duong Hai – NEU – www.mfe.edu.vn/buiduonghai

8

 Critical value and Reject Area are different

T-test for Mean T-test for Mean

Reject H0 Statistical value Hypotheses pair Critical value

>

: ≤ : >

= − < −

: ≥ : < ̅− /

/ ||> /

PROBABILITY & STATISTICS – Bui Duong Hai – NEU – www.mfe.edu.vn/buiduonghai

9

: = : ≠

Example Example

Example 9.2. In the past, average productivity of worker is 120. To improve productivity, new management procedure is applied. Recently survey of 25 workers shows sample mean is 126.2, sample variance is 225.  Assumed that productivity is Normality,  (a) Test the hypothesis that average productivity has

increased, at significant level of 5% and 1%

PROBABILITY & STATISTICS – Bui Duong Hai – NEU – www.mfe.edu.vn/buiduonghai

10

 Sample: = 25; ̅= 126.2; = 225  Then = 15

Example Example

 Hyp. Pair:

: ≤ 120 : > 120 .

/

=  Stat. value: =

 At 5%:

Critical value: . =

 At 1%:

PROBABILITY & STATISTICS – Bui Duong Hai – NEU – www.mfe.edu.vn/buiduonghai

11

Critical value: . =

P-value of the Test P-value of the Test

 There is one Probability value ∗ that Statistical value

equal Critical value

 Probability value of the test: −  The rule

 − <  Reject  − >  Not Reject

PROBABILITY & STATISTICS – Bui Duong Hai – NEU – www.mfe.edu.vn/buiduonghai

12

 Accurate − is calculated by software  Using table, find the interval of −

Example Example

 Example 9.2 (cont.)  (b) At 5%, test the hypothesis that recent average

productivity equals 130

 (c) Which interval contains the − of the test

in question (b): (0 – 1%); (1% – 5%); (5% – 10%); > 10%

PROBABILITY & STATISTICS – Bui Duong Hai – NEU – www.mfe.edu.vn/buiduonghai

13

 (d) At 10%, test the hypothesis that recent average productivity is less than 135, and estimate the − of the test

9.3. Z-test for Proportion 9.3. Z-test for Proportion

Statistical value Reject H0 Hypotheses pair Critical value

>

: ≤ : >

= − < −

: ≥ : < ̅− 1 − /

/ ||> /

PROBABILITY & STATISTICS – Bui Duong Hai – NEU – www.mfe.edu.vn/buiduonghai

14

: = : ≠

Example Example

Example 9.3. Last year, the proportion of visitors buying goods is 20%. Recent year, in observed 200 visitors, 52 of them buy at least one item. (a) With significant level at 5%, testing the hypothesis

that the buying proportion has increased

(b) Estimate the − of the test (c) At significant level of 1%, test the claim that

PROBABILITY & STATISTICS – Bui Duong Hai – NEU – www.mfe.edu.vn/buiduonghai

15

Proportion is 30%, and estimate the −

9.3. Chisq-test for Variance 9.3. Chisq-test for Variance

>

Statistical value Reject H0 Hypotheses pair

<

=

: ≤ : > : ≥ : < : = : ≠

> / Or < /

PROBABILITY & STATISTICS – Bui Duong Hai – NEU – www.mfe.edu.vn/buiduonghai

16

( − 1)

Example Example

Example 9.4. The required limit for the variability of fruits’ weight is 4g2. For sample of 20 fruits, sample variance is 5g2. (a) With the significant level of 5%, test the claim that the variability of fruits’ weight exceeds the required limit, assumed that the it is normal distributed. (b) Test the hypothesis that Population Standard

PROBABILITY & STATISTICS – Bui Duong Hai – NEU – www.mfe.edu.vn/buiduonghai

17

deviation is less than 4g

Key Concepts Key Concepts

PROBABILITY & STATISTICS – Bui Duong Hai – NEU – www.mfe.edu.vn/buiduonghai

18

 Hypotheses pair  Types of Error  Significant level  Critical value & Statistical value  Reject and Not reject H0  − of the test  T-test, Z-test, Chisq-test

Exercise Exercise

PROBABILITY & STATISTICS – Bui Duong Hai – NEU – www.mfe.edu.vn/buiduonghai

19

[1] Chapter 9, 11  (387) 1, 2, (389) 5, 7  (402) 10, 15, 17  (408) 23, 25, 27, 29, 34  (414) 36, 38, 40, 43  (491) 4, 11  Case Problem 1