Chapter 8-Statistical Inference - IT2110

Download as pdf or txt
Download as pdf or txt
You are on page 1of 26

8.

STATISTICAL INFERENCE
[IT2110]
By SLIIT Mathematics Unit
Faculty of Humanities and Sciences
• In most researches, we collect data through a sample survey over a
census survey.
• Statistical inference is used when sample survey is conducted over
a census survey.
• Inference: A conclusion reached on the basis of evidence and
reasoning.
- Oxford University Press -
• Statistical Inference: Drawing conclusions about population
parameters by using sample statistics.

2
Statistical
Inference

Parameter Hypothesis
Estimation Testing

Point Interval
Estimation Estimation
3
PARAMETER
ESTIMATION

4
Parameter Estimation
• In distribution theory we assumed that distribution parameters are
known.
• But practically they should be found or estimated.
• If estimated parameters are wrong, all calculated probabilities will
be inaccurate.
• Estimation can be done in two methods.
Point estimation
Interval estimation 5
Parameter Estimation
• Point estimation gives a single estimated value for the parameter.
• Interval estimation gives a range of values (interval) as the
estimate.
• There are many point and interval estimation methods with their
own criteria for use.
• Some interval estimates will be discussed later in this chapter.
6
HYPOTHESIS
TESTING

7
Hypothesis Testing
• Hypothesis: A supposition or proposed explanation made on the
basis of limited evidence as a starting point for further
investigation.
-Oxford University Press-

• Hypothesis testing is all about checking whether assumptions


(research hypothesis) are correct.

• These assumption should be regarding population parameters.


8
Major Steps under Hypothesis Testing

1. Define the hypothesis (𝐻0 & 𝐻1)


2. Test statistic and its distribution
3. Define the significance level (α)
4. Define the rejection region.
5. Conduct the test (Calculate test statistic value)
6. Conclusion

• There are various cases under hypothesis testing. The test statistic that
you should use depends on the case.
• In this session, we will discuss the hypothesis testing for one population
mean. 9
Hypothesis
Testing

Two
One Population
Populations

Population Population
Variance Proportion
Population Two dependent
Mean
Two
independent
Population
Population
variance
variance known
unknown To get more details go to
the following link:
http://goo.gl/4we99Q

Large Small Sample


Sample (n≥30) (n<30)
10
Defining Hypothesis
• The assumption should be clearly stated in order to test.
• Two statements, null hypothesis (𝐻0 ) and an alternative hypothesis
(𝐻1 or 𝐻𝑎 ) are used for that.
• 𝐻0 and 𝐻1 can be considered as opposites of each other.
• The statement with the equal (=) should always come to 𝐻0 . Usually
if a claim is made, it is selected for 𝐻1 .

11
Defining Hypothesis
𝐻0 : µ = 𝑎 Two-tailed
𝐻1 : µ ≠ 𝑎 Hypothesis

Three possible 𝐻0 : µ ≥ 𝑎
Hypothesis 𝐻1 : µ < 𝑎
One-tailed
Hypothesis
𝐻0 : µ ≤ 𝑎
𝐻1 : µ > 𝑎 12
Examples
1) In a coin tossing experiment, it should be found whether
a) it’s fair coin or not.
b) it’s biased in favor of heads.
c) it’s biased in favor of tails.

2) A company that manufactures cars claims that the gas mileage for its new line
of hybrid cars, on the average, is 60 miles per gallon (mpg) with a standard
deviation of 4 mpg. It was also found out that the mpg was normally
distributed. A random sample of 16 cars yielded a mean of 57 miles per gallon.
Is the company’s claim about the mean gas mileage per gallon of its cars,
correct?
13
Test Statistic
• Recap: A function of observable r.v.s that does not depend on any
unknown parameters is called a statistic.
• A test statistic is a quantity associated with the sample.
• The test statistic will depend on the parameter of interest as well
as the characteristics of the population.
• We assume that the assumption (𝐻0 ) is correct and find a sampling
distribution for the test statistic.
14
Test Statistic & Distribution
To Test
Population
Mean (µ)

σ2 𝑘𝑛𝑜𝑤𝑛 σ2 𝑢𝑛𝑘𝑛𝑜𝑤𝑛

𝑥−µ
𝑍= σ ~ N(0,1) n < 30 n ≥30
𝑛

𝑥−µ 𝑥−µ
T= 𝑆 ~ 𝑡𝑛−1 𝑍= 𝑆 ~ N(0,1)
𝑛 𝑛 15
Test Statistic [For µ - When σ 𝟐
known]

• Recap: Let 𝑋1 , … , 𝑋𝑛 be a random sample of size 𝑛 from a Normal


population with mean 𝜇 and variance σ𝟐 . Then,
𝜎2
𝑋 ~ 𝑁 µ,
𝑛
• Then,
𝑋 −µ
𝜎 ~ 𝑁(0,1)
𝑛
• If the hypothesis is, 𝐻0: 𝜇 = µ0vs. 𝐻1: 𝜇 ≠ µ0, then under 𝐻0,
𝑋 − µ0
𝜎 ~ 𝑁(0,1)
𝑛 16
Rejection Region [For µ ]
For a two-tailed hypothesis

Reject 𝐻0 if 𝑍𝑐𝑎𝑙 ≥ 𝒂𝟐
OR if 𝑍𝑐𝑎𝑙 ≤ 𝒂𝟏

-𝑍α/2 𝑜𝑟 −𝑡 𝑛−1 ,α/2 (a1) 𝑍α/2 𝑜𝑟 𝑡 𝑛−1 ,α/2 (a2)

Critical Values 17
𝐻0 ∶ µ ≥ 𝑎
For a one-tailed hypothesis 𝐻1 ∶ µ < 𝑎

Reject 𝐻0 if 𝑍𝑐𝑎𝑙 < 𝒂𝟏

-𝑍α 𝑜𝑟 −𝑡 𝑛−1 ,α (a1) Critical Value


18
𝐻0 ∶ µ ≤ 𝑎
For a one-tailed hypothesis 𝐻1 ∶ µ > 𝑎

Reject 𝐻0 if 𝑍𝑐𝑎𝑙 > 𝒂𝟏

Critical Value 𝑍α 𝑜𝑟 𝑡 𝑛−1 ,α (a1)

19
Example 02:

• 𝑯𝟎 : µ = 60
Two-tailed hypothesis
𝑯𝟏 : µ ≠ 60

• Test Statistic: Under 𝐻0,


𝒙−𝟔𝟎
Z= 𝝈 ~ 𝑵(𝟎, 𝟏)
𝒏

• Consider 5% level of significance.


20
• Rejection Region:

Reject 𝐻0 if 𝑍𝑐𝑎𝑙 > 𝑍0.025 OR


if 𝑍𝑐𝑎𝑙 <−𝑍0.025

−𝑍0.025 𝑍0.025

𝑍0.025 = 1.96
21
• Test:
𝑥 = 57 , σ = 4 & 𝑛 = 16
x−60
Then, 𝑍𝐶𝑎𝑙 = σ
n

57−60
𝑍𝐶𝑎𝑙 = 4
16

𝑍𝐶𝑎𝑙 = -3
• Conclusion:
Since 𝑍𝐶𝑎𝑙 = -3 < -1.96 = 𝑍0.025 , we reject 𝐻0 at 5% level of
significance.Therefore, there is no enough evidence to suggest that
company’s claim about the mean gas mileage per gallon of its cars is
correct. 22
P value Approach
• This is an alternative way of deciding the rejection criteria.
• P value: The probability of obtaining a test statistic which is more
extreme than observed test statistic value given when 𝐻0 is
true.
Pr ( |TS| > |𝑻𝑺𝑪𝒂𝒍 |) Two tailed Hypothesis

P value Pr (TS > 𝑻𝑺𝑪𝒂𝒍 ) 𝑯𝟏 : µ > a

Pr (TS < 𝑻𝑺𝑪𝒂𝒍 ) 𝑯𝟏 : µ < a


23
• For any test,

If p value < significance level (α) Reject 𝑯𝟎

If p value ≥ significance level (α) Do not Reject 𝑯𝟎

24
Errors in Hypothesis Testing
True State of the Null Hypothesis
Statistical Decision
𝑯𝟎 is True 𝑯𝟎 is False

Reject 𝑯𝟎 Type I Error Correct

Do not Reject 𝑯𝟎 Correct Type II Error

Pr (Type I Error) = Pr (𝑅𝑒𝑗𝑒𝑐𝑡 𝑯𝟎 |𝑯𝟎 𝑡𝑟𝑢𝑒) = α


Pr (Type II Error) = Pr (Do not 𝑅𝑒𝑗𝑒𝑐𝑡 𝑯𝟎 |𝑯𝟎 𝐟𝐚𝐥𝐬𝐞) = β

25
THANKS!
Any questions?

26

You might also like