STATISTICAL ANALYSIS - LECTURE 10

34
STATISTICAL ANALYSIS - LECTURE 10 Dr. Mahmoud Mounir [email protected]

Transcript of STATISTICAL ANALYSIS - LECTURE 10

Page 1: STATISTICAL ANALYSIS - LECTURE 10

STATISTICAL ANALYSIS -LECTURE 10Dr. Mahmoud Mounir

[email protected]

Page 2: STATISTICAL ANALYSIS - LECTURE 10

STATISTICAL INFERENCE

Page 3: STATISTICAL ANALYSIS - LECTURE 10

Recap

Statistics

Descriptive Inferential

Estimation

Point Estimation

ยต = เดฅ๐’™ and p = เท๐’‘

Interval

(Lower Limit, Upper Limit)

Hypothesis

Page 4: STATISTICAL ANALYSIS - LECTURE 10

Statistical Inference

โžข The statistical inference is the process of making

judgment about a population based on the

properties of a random sample from the

population.

Page 5: STATISTICAL ANALYSIS - LECTURE 10

Estimators

Estimator (Sample Statistic)

Population Parameter

เดฅ๐’™ ESTIMATES ยต

S2 ESTIMATES ฯƒ2

S ESTIMATES ฯƒ

เท๐’‘ ESTIMATES p

เดฅ๐’™๐Ÿ- เดฅ๐’™๐Ÿ ESTIMATES ยต1 - ยต2

เท๐’‘๐Ÿ โˆ’ เท๐’‘๐Ÿ ESTIMATES p1 โ€“ p2

Page 6: STATISTICAL ANALYSIS - LECTURE 10

Confidence Interval (CI)

Population Parameter = Estimator ยฑ Margin of Error (d)

Where:

Margin of Error (d) = Critical Value of Z * Standard Error

Population Parameter โˆˆ

[Estimator โˆ’ Margin of Error (d) , Estimator + Margin of Error (d)]

Page 7: STATISTICAL ANALYSIS - LECTURE 10

Confidence Interval (CI) for Single Mean

๐ = เดฅ๐’™ ยฑ ๐’›๐ˆ

๐’

๐ โˆˆ [เดฅ๐’™ โˆ’ ๐’›๐ˆ

๐’, เดฅ๐’™ + ๐’›

๐ˆ

๐’]

Page 8: STATISTICAL ANALYSIS - LECTURE 10

Confidence Interval (CI) for Single Proportion

๐’‘ = เท๐’‘ ยฑ ๐’›เท๐’‘ ๐Ÿ โˆ’ เท๐’‘

๐’

๐’‘ โˆˆ [ เท๐’‘ โˆ’ ๐’›เท๐’‘ ๐Ÿโˆ’เท๐’‘

๐’, เท๐’‘ + ๐’›

เท๐’‘ ๐Ÿโˆ’เท๐’‘

๐’]

Page 9: STATISTICAL ANALYSIS - LECTURE 10

Standard Error for Different Sample Statistics

Estimator (Sample Statistic)

Standard Error

เดฅ๐’™

เท๐’‘

เดฅ๐’™๐Ÿ- เดฅ๐’™๐Ÿ

เท๐’‘๐Ÿ โˆ’ เท๐’‘๐Ÿ

Page 10: STATISTICAL ANALYSIS - LECTURE 10

Confidence Interval (CI)

(1-ฮฑ) Confidence Level

ฮฑ Confidence Coefficient

โˆ’๐’›(๐Ÿโˆ’ ฮค๐œถ ๐Ÿ) ๐’›(๐Ÿโˆ’ ฮค๐œถ ๐Ÿ)

Page 11: STATISTICAL ANALYSIS - LECTURE 10

Critical Value for Z:

Page 12: STATISTICAL ANALYSIS - LECTURE 10
Page 13: STATISTICAL ANALYSIS - LECTURE 10

Confidence Interval (CI) for the Difference Between

Two Population Means

๐๐Ÿโˆ’ ๐๐Ÿ = เดฅ๐’™๐Ÿโˆ’ เดฅ๐’™๐Ÿ ยฑ ๐’›ฯƒ๐Ÿ๐Ÿ

๐’๐Ÿ

+ฯƒ๐Ÿ๐Ÿ

๐’๐Ÿ

๐๐Ÿโˆ’ ๐๐Ÿ โˆˆ

[ เดฅ๐’™๐Ÿโˆ’ เดฅ๐’™๐Ÿ โˆ’ ๐’›ฯƒ๐Ÿ๐Ÿ

๐’๐Ÿ

+ฯƒ๐Ÿ๐Ÿ

๐’๐Ÿ

, เดฅ๐’™๐Ÿโˆ’ เดฅ๐’™๐Ÿ + ๐’›ฯƒ๐Ÿ๐Ÿ

๐’๐Ÿ

+ฯƒ๐Ÿ๐Ÿ

๐’๐Ÿ

]

Page 14: STATISTICAL ANALYSIS - LECTURE 10

Confidence Interval (CI) for Difference Between

Two Population Proportions

(๐’‘๐Ÿ โˆ’ ๐’‘๐Ÿ) = (เท๐’‘๐Ÿ โˆ’ เท๐’‘๐Ÿ) ยฑ ๐’›เท๐’‘๐Ÿ๐Ÿโˆ’เท๐’‘

๐Ÿ

๐’๐Ÿ

+เท๐’‘๐Ÿ๐Ÿโˆ’เท๐’‘

๐Ÿ

๐’๐Ÿ

(๐’‘๐Ÿ โˆ’ ๐’‘๐Ÿ) โˆˆ

[ เท๐’‘๐Ÿโˆ’ เท๐’‘๐Ÿ โˆ’ ๐’›เท๐’‘๐Ÿ๐Ÿโˆ’เท๐’‘

๐Ÿ

๐’๐Ÿ

+เท๐’‘๐Ÿ๐Ÿโˆ’เท๐’‘

๐Ÿ

๐’๐Ÿ

, เท๐’‘๐Ÿโˆ’ เท๐’‘๐Ÿ + ๐’›เท๐’‘๐Ÿ๐Ÿโˆ’เท๐’‘

๐Ÿ

๐’๐Ÿ

+เท๐’‘๐Ÿ๐Ÿโˆ’เท๐’‘

๐Ÿ

๐’๐Ÿ

]

Page 15: STATISTICAL ANALYSIS - LECTURE 10

Hypothesis Tests

Statistics

Descriptive Inferential

Estimation

Point Estimation

ยต = เดฅ๐’™ and p = เท๐’‘

Interval

(Lower Limit, Upper Limit)

Hypothesis

Page 16: STATISTICAL ANALYSIS - LECTURE 10

Hypothesis

โžข It is a claim or statement about a population

parameter.

โžข For example, the average age of college students

equals 23 years.

Page 17: STATISTICAL ANALYSIS - LECTURE 10

Null Hypothesis (Ho)

โžข Usually, the null hypothesis represents a statement

of โ€œno effect,โ€ โ€œno difference,โ€ or, put another way,

โ€œthings havenโ€™t changed.โ€

โžข For example, Ho: ฮผ = 23

Page 18: STATISTICAL ANALYSIS - LECTURE 10

Alternate Hypothesis (Ha) or (H1)

โžข This test is a statistical test is designed to assess the

strength of the evidence (data) against the null

hypothesis.

โžข For example, H1: ฮผ โ‰  23

Page 19: STATISTICAL ANALYSIS - LECTURE 10

Test Statistics

Page 20: STATISTICAL ANALYSIS - LECTURE 10

The Critical Region

Hypothesis Tests

Two-Tailed

Ho: ฮผ = 23

H1: ฮผ โ‰  23

Left-Tailed

Ho: ฮผ โ‰ฅ 23

H1: ฮผ < 23

Right-Tailed

Ho: ฮผ โ‰ค 23

H1: ฮผ > 23

Page 21: STATISTICAL ANALYSIS - LECTURE 10

The Critical Region

Fail to reject HoFail to reject Ho

Fail to reject Ho

ฮฑ: Significance Level

Page 22: STATISTICAL ANALYSIS - LECTURE 10

Steps for Hypothesis Test

โžข Step 1: State the null and alternative hypothesis (Ho and

H1).

โžข Step 2: Specify the suitable test statistic.

โžข Step 3: Compute the critical value for the statistic.

โžข Step 4: Make a decision.

Reject Ho or Fail to reject Ho

โžข Step 5: Make a conclusion

Accept H1 or we donโ€™t have enough evidence to support H1

Page 23: STATISTICAL ANALYSIS - LECTURE 10

In recent years, the mean age of all college students

in a city has been 23. A random sample of 42

students revealed a mean age of 23.8 suppose their

ages are normally distributed with a population

standard deviation of ฯƒ=2.4 can we infer at ฮฑ=0.05

that the population mean has changed?

Example (1)

Page 24: STATISTICAL ANALYSIS - LECTURE 10

Solution๐œ‡ = 23 ๐‘› = 42 ๐œŽ = 2.4 าง๐‘ฅ = 23.8

Step 1: State the null and alternative hypothesis (Ho and H1)

Null hypothesis (Ho) ๐œ‡ = 23

alternative hypothesis (H1) ๐œ‡ โ‰  23

Step 2: Specify the suitable test statistic

Since ๐‘› โ‰ฅ 30 and ๐œŽ is known, we will use Z-statistic

๐› = ๐Ÿ๐Ÿ‘ ๐›” = ๐Ÿ. ๐Ÿ’ ๐ง = ๐Ÿ’๐Ÿ เดค๐ฑ = ๐Ÿ๐Ÿ‘. ๐Ÿ–

๐›เดค๐ฑ = ๐› = ๐Ÿ๐Ÿ‘

๐›”เดค๐ฑ =๐›”

๐ง

=๐Ÿ. ๐Ÿ’

๐Ÿ’๐Ÿ= ๐ŸŽ. ๐Ÿ‘๐Ÿ•

๐ณเดค๐ฑ =เดค๐ฑ โˆ’ ๐›

๐›”เดค๐ฑ

=๐Ÿ๐Ÿ‘. ๐Ÿ– โˆ’ ๐Ÿ๐Ÿ‘

๐ŸŽ. ๐Ÿ‘๐Ÿ•= ๐Ÿ. ๐Ÿ๐Ÿ”

Page 25: STATISTICAL ANALYSIS - LECTURE 10

SolutionStep 3: Compute the critical value for the statistic

๐Ÿ โˆ’ ๐›‚ = ๐ŸŽ. ๐Ÿ—๐Ÿ“ ๐›‚ = ๐ŸŽ. ๐ŸŽ๐Ÿ“๐›‚

๐Ÿ=. ๐ŸŽ๐Ÿ๐Ÿ“

๐Ÿ โˆ’๐›‚

๐Ÿ= ๐ŸŽ. ๐Ÿ—๐Ÿ•๐Ÿ“ ยฑ๐ณ๐Ÿโˆ’๐›‚/๐Ÿ = ยฑ๐Ÿ. ๐Ÿ—๐Ÿ”

Page 26: STATISTICAL ANALYSIS - LECTURE 10

Solution

Step 5: Make a conclusion

We accept ๐ป1, there is enough evidence that

mean age has changed at ๐›ผ = 0.05

Step 4: Make a decision

๐‘ง าง๐‘ฅ = 2.16 which is greater than 1.96

=> ๐‘ง าง๐‘ฅ = 2.16 > 1.96, so we reject ๐ป0

Fail to reject Ho

Page 27: STATISTICAL ANALYSIS - LECTURE 10

In the previous example, if the confidence level (ฮฑ)

= 0.02, what can we infer about the population

mean ?

Example (2)

Page 28: STATISTICAL ANALYSIS - LECTURE 10

Solution๐œ‡ = 23 ๐‘› = 42 ๐œŽ = 2.4 าง๐‘ฅ = 23.8

Step 1: State the null and alternative hypothesis (Ho and H1)

Null hypothesis (Ho) ๐œ‡ = 23

alternative hypothesis (H1) ๐œ‡ โ‰  23

Step 2: Specify the suitable test statistic

Since ๐‘› โ‰ฅ 30 and ๐œŽ is known, we will use Z-statistic

๐› = ๐Ÿ๐Ÿ‘ ๐›” = ๐Ÿ. ๐Ÿ’ ๐ง = ๐Ÿ’๐Ÿ เดค๐ฑ = ๐Ÿ๐Ÿ‘. ๐Ÿ–

๐›เดค๐ฑ = ๐› = ๐Ÿ๐Ÿ‘

๐›”เดค๐ฑ =๐›”

๐ง

=๐Ÿ. ๐Ÿ’

๐Ÿ’๐Ÿ= ๐ŸŽ. ๐Ÿ‘๐Ÿ•

๐ณเดค๐ฑ =เดค๐ฑ โˆ’ ๐›

๐›”เดค๐ฑ

=๐Ÿ๐Ÿ‘. ๐Ÿ– โˆ’ ๐Ÿ๐Ÿ‘

๐ŸŽ. ๐Ÿ‘๐Ÿ•= ๐Ÿ. ๐Ÿ๐Ÿ”

Page 29: STATISTICAL ANALYSIS - LECTURE 10

SolutionStep 3: Compute the critical value for the statistic

๐Ÿ โˆ’ ๐›‚ = ๐ŸŽ. ๐Ÿ—๐Ÿ– ๐›‚ = ๐ŸŽ. ๐ŸŽ๐Ÿ๐›‚

๐Ÿ=. ๐ŸŽ๐Ÿ

๐Ÿ โˆ’๐›‚

๐Ÿ= ๐ŸŽ. ๐Ÿ—๐Ÿ— ยฑ๐ณ๐Ÿโˆ’๐›‚/๐Ÿ = ยฑ๐Ÿ. ๐Ÿ‘๐Ÿ‘

Page 30: STATISTICAL ANALYSIS - LECTURE 10

Solution

Step 5: Make a conclusion

We donโ€™t have enough evidence to accept ๐ป1, or

we donโ€™t have enough evidence that mean age

has changed at ๐›ผ = 0.02

Step 4: Make a decision

๐‘ง าง๐‘ฅ = 2.16 which is greater than 1.96

=> ๐‘ง าง๐‘ฅ = 2.16 < 1.96, so we fail to reject ๐ป0

Fail to reject Ho

Page 31: STATISTICAL ANALYSIS - LECTURE 10

A random sample of 27 observations from a large

population has a mean of 22 and a standard

deviation of 4.8. can we conclude at ฮฑ = 0.01 that a

population mean is significantly below 24?

Example (3)

Page 32: STATISTICAL ANALYSIS - LECTURE 10

Solution๐œ‡ = 2๐Ÿ’ ๐‘› = ๐Ÿ๐Ÿ• ๐ฌ = ๐Ÿ’. ๐Ÿ– าง๐‘ฅ = ๐Ÿ๐Ÿ

Step 1: State the null and alternative hypothesis (Ho and H1)

Null hypothesis (Ho) ๐œ‡ โ‰ฅ 23

alternative hypothesis (H1) ๐œ‡ < 23

Step 2: Specify the suitable test statistic

Since ๐‘› < 30 and ๐œŽ is unknown, we will use t-statistic

๐ = ๐Ÿ๐Ÿ’ ๐’ = ๐Ÿ๐Ÿ• ๐ฌ = ๐Ÿ’. ๐Ÿ– เดฅ๐’™ = ๐Ÿ๐Ÿ

๐›เดค๐ฑ = ๐› = ๐Ÿ๐Ÿ’

๐›”เดค๐ฑ =๐’”

๐ง

=๐Ÿ’. ๐Ÿ–

๐Ÿ๐Ÿ•= ๐ŸŽ. ๐Ÿ—๐Ÿ๐Ÿ’

๐’• =เดค๐ฑ โˆ’ ๐›

๐›”เดค๐ฑ

=๐Ÿ๐Ÿ โˆ’ ๐Ÿ๐Ÿ’

๐ŸŽ. ๐Ÿ—๐Ÿ๐Ÿ’= โˆ’๐Ÿ. ๐Ÿ๐Ÿ”๐Ÿ“

Page 33: STATISTICAL ANALYSIS - LECTURE 10

SolutionStep 3: Compute the critical value for the statistic

๐Ÿ โˆ’ ๐›‚ = ๐ŸŽ. ๐Ÿ—๐Ÿ– ๐›‚ = ๐ŸŽ. ๐ŸŽ๐Ÿ

โˆ’๐’•๐›‚ ๐Ÿ๐Ÿ• โˆ’ ๐Ÿ = โˆ’๐’•๐ŸŽ.๐ŸŽ๐Ÿ ๐Ÿ๐Ÿ” = โˆ’๐Ÿ. ๐Ÿ’๐Ÿ•๐Ÿ—

Page 34: STATISTICAL ANALYSIS - LECTURE 10

Solution

Step 5: Make a conclusion

We donโ€™t have enough evidence to accept ๐ป1, or

we fail to support ๐ป1

Step 4: Make a decision

๐‘ก = 2.165 which is greater than -2.479 ,

So we fail to reject ๐ป0

Fail to reject Ho-tฮฑ