0% found this document useful (0 votes)
13 views62 pages

11.estimation IV

Uploaded by

Bintay Hawa
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views62 pages

11.estimation IV

Uploaded by

Bintay Hawa
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 62

STATISTICAL INFERENCE

PART IV
CONFIDENCE INTERVALS AND
HYPOTHESIS TESTING

1
INTERVAL ESTIMATION
• Point estimation of : The inference is a guess
of a single value as the value of . No accuracy
associated with it.
• Interval estimation for : Specify an interval in
which the unknown parameter, , is likely to
lie. It contains measure of accuracy through
variance.

2
INTERVAL ESTIMATION
• An interval with random end points is called
a random interval. E.g.,
5X 5X 
Pr      0.95
 8 3 

 5 X 5 X  is a random interval that


 8 , 3  contains the true value of  with
 
probability 0.95.

3
INTERVAL ESTIMATION
• An interval (l(x1,x2,…,xn), u(x1,x2,…,xn)) is
called a 100 % confidence interval (CI) for 
if
Pr l  x1 , x2 ,, xn     u  x1 , x2 ,, xn   
where 0<<1.
• The observed values l(x1,x2,…,xn) is a lower
confidence limit and u(x1,x2,…,xn) is an upper
confidence limit. The probability  is called
the confidence coefficient or the confidence
level.
4
INTERVAL ESTIMATION

• If Pr(l(x1,x2,…,xn))= , then l(x1,x2,…,xn) is


called a one-sided lower 100 % confidence
limit for  .
• If Pr( u(x1,x2,…,xn))= , then u(x1,x2,…,xn)
is called a one-sided upper 100 %
confidence limit for  .

5
METHODS OF FINDING PIVOTAL
QUANTITIES
• PIVOTAL QUANTITY METHOD:
If Q=q(x1,x2,…,xn) is a r.v. that is a function of
only X1,…,Xn and , then Q is called a pivotal
quantity if its distribution does not depend on
 or any other unknown parameters (nuisance
parameters).
nuisance parameters: parameters that are not of direct
interest

6
PIVOTAL QUANTITY METHOD
Theorem: Let X1,X2,…,Xn be a r.s. from a
distribution with pdf f(x;) for  and
assume that an MLE (or ss) of  exists: ˆ
ˆ
• If  is a location parameter, then Q=  is a
pivotal quantity.
ˆ
• If  is a scale parameter, then Q= / is a
pivotal quantity.
• If 1 and 2 are location and scale parameters
respectively,
ˆ then
1  1 ˆ2
ˆ
and are PQs for 1 and  2.
2 2 7
Note
• Example: If 1 and 2 are location and scale
parameters respectively, then
ˆ1  1 is NOT a pivotal quantity for 1
2

because it is a function of 2
A pivotal quantity for 1 should be a function of
only 1 and X’s, and its distribution should be
free of 1 and 2 .
8
Example
• X1,…,Xn be a r.s. from Exp(θ). Then,
n
S   Xi
i 1
is SS for θ, and θ is a scale
parameter.
S/θ is a pivotal quantity.
 So is 2S/θ, and using this might be more
convenient since this has a distribution of
χ²(2n) which has tabulated percentiles.

9
CONSTRUCTION OF CI USING PIVOTAL
QUANTITIES
• If Q is a PQ for a parameter  and if
percentiles of Q say q1 and q2 are available
such that
Pr{q1 Q q2}=,
Then for an observed sample x1,x2,…,xn; a 100
% confidence region for  is the set of 
that satisfy q1 q(x1,x2,…,xn;)q2.

10
EXAMPLE
• Let X1,X2,…,Xn be a r.s. of Exp(), >0.
Find a 100 % CI for  . Interpret the
result.

11
EXAMPLE
• Let X1,X2,…,Xn be a r.s. of N(,2). Find a
100 % CI for  and 2 . Interpret the
results.

12
APPROXIMATE CI USING CLT
• Let X1,X2,…,Xn be a r.s. Non-normal
random sample
• By CLT,
X  EX  X  d
  N  0,1
V X  / n
The approximate 100(1−)% random interval for μ:

   
P  X  z /2    X  z /2   1
 n n

The approximate 100(1 −)% CI for μ:

 
x  z /2    x  z /2
n n
13
APPROXIMATE CI USING CLT
• Usually,  is unknown. So, the approximate
100(1)% CI for : Non-normal
random sample

s s
x  t /2,n1    x  t /2,n1
n n
•When the sample size n ≥ 30, t/2,n-1~N(0,1).

s s
x  z /2    x  z /2
n n
14
Interpretation
( )
( )
( )
( )
( )
( )
( )
( )
( )
( )
μ (unknown, but true value)
90% CI  Expect 9 out of 10 intervals to cover the true μ
15
Graphical Demonstration of the Confidence
Interval for 

Confidence level

1-

 
x  z 2 x x  z 2
n n

Lower confidence limit  Upper confidence limit


2z  2
n
16
The Confidence Interval for  (  is known)

• Example: Suppose that  = 1.71 and n=100. Use a 90%


confidence level.

•Solution: The confidence interval is

 1.71
x  z 2  x  1.645  x  .28
n 100

17
The Confidence Interval for  (  is known)

• Recalculate the confidence interval for 95% confidence level.


 1.71
• Solution: x  z  2  x  1.96  x  .34
n 100

.95
.90
x  .28 x  .28
x  .34 x  .34
18
The Confidence Interval for  (  is known)

•• The
The width
width of
of the
the 90%
90% confidence
confidence interval
interval == 2(.28)
2(.28) == .56
.56
The width
The width of
of the
the 95%
95% confidence
confidence interval
interval == 2(.34)
2(.34) == .68
.68

Because the
•• Because the 95%
95% confidence
confidence interval
interval isis wider,
wider, itit isis
more likely
more likely to
to include
include the
the value
value of 
of 

• With
95% confidence interval, we allow ourselves to
make 5% error; with 90% CI, we allow for 10%.

19
The Width of the Confidence Interval

The width of the confidence interval is


affected by
• the population standard deviation ()
• the confidence level (1-)
• the sample size (n).

20
The Affects of  on the interval width

/2 = .05 /2 = .05


90%

Confidence level

 
2z.05  2(1.645)
n n Suppose the standard
deviation has increased
1.5 1.5
2z .05  2(1.645) by 50%.
n n

To maintain
To maintainaacertain
certainlevel
levelofofconfidence,
confidence,aalarger
larger
standarddeviation
standard deviationrequires
requiresaalarger
largerconfidence
confidenceinterval.
interval.
21
The Affects of Changing the Confidence Level

/2 = 5% /2 = 5%
/2 = 2.5% /2 = 2.5%
Confidence level
90%
95%

 
2z .05  2(1.645)
n n Let us increase the
confidence level
  from 90% to 95%.
2z .025  2(1.96)
n n
Largerconfidence
Larger confidencelevel
levelproduces
producesaawider
widerconfidence
confidenceinterval
interval
22
The Affects of Changing the Sample Size

90%

Confidence level

 
2z .05  2(1.645)
n n

Increasingthe
Increasing thesample
samplesize
sizedecreases
decreasesthe
thewidth
widthofofthe
the
confidenceinterval
confidence intervalwhile
whilethe
theconfidence
confidencelevel
levelcan
canremain
remain
unchanged.
unchanged.
23
Inference About the Population Mean
when  is Unknown
• The Student t Distribution
Standard Normal

Student t

24
Effect of the Degrees of Freedom on the t
Density Function

Student t with 30 DF
Student t with 2 DF
Student t with 10 DF

0
The “degrees of freedom”, (a function of the sample size)
determine how spread the distribution is compared to the normal
distribution. 25
Finding t-scores Under a t-
Distribution (t-tables)
Degrees of
Freedom t.100 t.05 t.025 t.01 t.005
1 3.078 6.314 12.706 31.821 63.657
2 1.886 2.920 4.303 6.965 9.925 .05
3 1.638 2.353 3.182 4.541 5.841
4 1.533 2.132 2.776 3.747 4.604
5 1.476 2.015 2.571 3.365 4.032
t
1.812
6 1.440 1.943 2.447 3.143 3.707 0
7 1.415 1.895 2.365 2.998 3.499
8 1.397 1.860 2.306 2.896 3.355
9 1.383 1.833 2.262 2.821 3.250
10 1.372 1.812 2.228 2.764 3.169
11 1.363 1.796 2.201 2.718 3.106
12 1.356 1.782 2.179 2.681 3.055
t0.05, 10 = 1.812
26
EXAMPLE
• A new breakfast cereal is test-marked for 1
month at stores of a large supermarket chain.
The result for a sample of 16 stores indicate
average sales of $1200 with a sample
standard deviation of $180. Set up 99%
confidence interval estimate of the true
average sales of this new breakfast cereal.
Assume normality.
n  16 ,x  $1200,s  $180,  0.01
 t / 2 ,n1  t0.005 ,15  2.947
27
ANSWER
• 99% CI for :
s 180
x  t / 2 ,n1  1200  2.947  1200  132.6015
n 16
(1067.3985, 1332.6015)
With 99% confidence, the limits 1067.3985 and
1332.6015 cover the true average sales of the
new breakfast cereal.

28
Checking the required conditions
• We need to check that the population is
normally distributed, or at least not
extremely nonnormal.
• Look at the sample histograms, Q-Q plots …
• There are statistical methods to test for
normality

29
TESTS OF HYPOTHESIS
• A hypothesis is a statement about a
population parameter.

• The goal of a hypothesis test is to decide


which of two complementary hypothesis is
true, based on a sample from a population.

30
TESTS OF HYPOTHESIS
• STATISTICAL TEST: The statistical
procedure to draw an appropriate
conclusion from sample data about a
population parameter.
• HYPOTHESIS: Any statement concerning an
unknown population parameter.
• Aim of a statistical test: test an hypothesis
concerning the values of one or more
population parameters.

31
NULL AND ALTERNATIVE HYPOTHESIS
• NULL HYPOTHESIS=H0
– E.g., a treatment has no effect or there is no
change compared with the previous situation.
• ALTERNATIVE HYPOTHESIS=HA
– E.g., a treatment has a significant effect or there is
development compared with the previous
situation.

32
TESTS OF HYPOTHESIS
• Sample Space, A: Set of all possible values of sample
values x1,x2,…,xn.
(x1,x2,…,xn) A
• Parameter Space, : Set of all possible values of the
parameters.
 =Parameter Space of Null Hypothesis Parameter
Space of Alternative Hypothesis
 = 0  1

H0:0
H1: 1

33
TESTS OF HYPOTHESIS
• Critical Region, C is a subset of A which leads
to rejection region of H0.
Reject H0 if (x1,x2,…,xn)C
Not Reject H0 if (x1,x2,…,xn)C’
• A test defines a critical region
• A test is a rule which leads to a decision to fail
to reject or reject H0 on the basis of the
sample information.
34
TEST STATISTIC AND REJECTION
REGION
• TEST STATISTIC: The sample statistic on which
we base our decision to reject or not reject
the null hypothesis.
• REJECTION REGION: Range of values such
that, if the test statistic falls in that range, we
will decide to reject the null hypothesis,
otherwise, we will not reject the null
hypothesis.

35
TESTS OF HYPOTHESIS
• If the hypothesis completely specify the
distribution, then it is called a simple
hypothesis. Otherwise, it is composite
hypothesis.
• =(1, 2)
H0:1=3f(x;3, 2) Composite Hypothesis

H1:1=5f(x;5, 2)
If 2 is known, simple hypothesis.
36
TESTS OF HYPOTHESIS
H0 is True H0 is False

Type I error
Reject H0 P(Type I error) =  Correct Decision
1-

Type II error
Do not reject H0 Correct Decision
1- P(Type II error) = 

Tests are based on the following principle:


Fix , minimize .
()=Power function of the test for all .
= P(Reject H0)=P((x1,x2,…,xn)C)
37
TESTS OF HYPOTHESIS
    PReject H 0 H 0 is true 
 0
 PType I error     
Type I error=Rejecting H0 when H0 is true
max
 0
     max. prob. of Type I error
    PReject H 0 H1 is true 
 1
 1  PNot Reject H 0 H1 is true   1    
max
 1
        max. prob. of Type II error
38
PROCEDURE OF STATISTICAL TEST

1. Determining H0 and HA.


2. Choosing the best test statistic.
3. Deciding the rejection region (Decision
Rule).
4. Conclusion.

39
HYPOTHESIS TEST FOR POPULATION
MEAN, 
•  KNOWN AND X~N(, 2) OR LARGE SAMPLE
CASE:
Two-sided Test Test Statistic Rejecting Area
H0:  = 0 x  0
z /2
HA:   0 / n /2 1-
-z/2 z/2

Reject H0 Reject Hp

• Reject H0 if z < z/2 or z > z/2. Do not reject H0

40
HYPOTHESIS TEST FOR POPULATION
MEAN, 
One-sided Tests Test Statistic Rejecting Area
1. H0:  = 0 x  0 
HA:  > 0 z 1-
/ n z

Do not reject H0 Reject H0


• Reject H0 if z > z.
2. H0:  = 0 x  0
z 
HA:  < 0 / n 1-
- z

• Reject H0 if z < z. Reject H0 Do not reject H0

41
POWER OF THE TEST AND
P-VALUE
• 1- = Power of the test
= P(Reject H0|H0 is not true)
• p-value = Observed significance level = Probability of
obtaining a test statistics at least as extreme as the
one that you observed by chance, OR, the smallest
level of significance at which the null hypothesis can
be rejected OR the maximum value of  that you are
willing to tolerate.

42
CALCULATION OF P-VALUE
x  0
• Determine the value of the test statistics, z 0 
• For One-Tailed Test: / n
p-value= P(z > z0) if HA: >0 p-value

z0
p-value= P(z < z0) if HA: <0 p-value

• For Two-Tailed Test z0

p=p-value = 2.P(z>z0) p/2


p/2

p=p-value = 2.P(z<-z0)
-z0 z0

43
DECISION RULE BY USING P-VALUES

• REJECT H0 IF p-value < 



p-value

• DO NOT REJECT H0 IF p-value  

44
Example
• Do the contents of bottles of catsup have a
net weight below an advertised threshold of
16 ounces?
• To test this 25 bottles of catsup were selected.
They gave a net sample mean weight of X  15.9
. It is known that the standard deviation is  .4
. We want to test this at significance levels
1% and 5%.

45
Computer Output
Excel Output

Test of Hypothesis About MU (SIGMA Known)

Test of MU = 16 Vs MU less than 16


SIGMA = 0.4
Sample mean = 15.9
Test Statistic: z = -1.25
P-Value = 0.1056
•Minitab Output:
Z-Test
Test of mu = 16.0000 vs mu < 16.0000
The assumed sigma = 0.400
Variable N Mean StDev SE Mean Z P
Catsup 25 15.9000 0.5017 0.0800 -1.25 0.11
SO DON’T REJECT THE NULL HYPOTHESIS IN THIS CASE 46
CALCULATIONS
The z-score is: 15.9  16
Z  1.25
 
.4
25
The p-value is the probability of getting a score worse
than this (relative to the alternative hypothesis) i.e.,
P(Z  1.25)  .1056
Compare the p-value to the significance level. Since
it is bigger than both 1% and 5%, we do not reject
the null hypothesis.

47
P-value for this one-tailed Test

• The p-value for this test is 0.1056

0.1056

0.10

0.05
-1.25

• Thus, do not reject H0 at 1% and 5% significance level. We do


not have enough evidence to say that the contents of bottles
of catsup have a net weight of less than 16 ounces.
48
Test of Hypothesis for the Population
Mean ( unknown)
• For samples of size n drawn from a Normal
Population, the test statistic:
x-
t
s/ n
has a Student t-distribution with n1 degrees
of freedom

49
EXAMPLE
• 5 measurements of the tar content of a
certain kind of cigarette yielded 14.5, 14.2,
14.4, 14.3 and 14.6 mg per cigarette. Show
the difference between the mean of this
sample x  14.4 and the average tar
content claimed by the manufacturer,
=14.0, is significant at =0.05.
5
(
 ix  x )2
( 14.5  14.4 )2  ...  ( 14.6  14.4 )2
s2  i 1
  0.025
n 1 5 1
s  0.158 50
SOLUTION
• H0:  = 14.0
HA:   14.0
x  0 14.4  14.0
t   5.66
s / n 0.158 / 5
t / 2 ,n1  t0.025 ,4  2.766

Decision Rule: Reject Ho if t<-t/2 or t> t/2.

51
CONCLUSION
• Reject H0 at  = 0.05. Difference is significant.

0.025 0.025
0.95

-2.766 2.766 5.66

Reject H0 Reject H0

52
P-value of This Test
• p-value = 2.P(t > 5.66) = 2(0.0024)=0.0048
Since p-value = 0.0048 <  = 0.05, reject H0.
Minitab Output
T-Test of the Mean
Test of mu = 14.0000 vs mu not = 14.0000

Variable N Mean StDev SE Mean T P-Value


C1 5 14.4000 0.1581 0.0707 5.66 0.0048

53
CONCLUSION USING THE CONFIDENCE
INTERVALS
MINITAB OUTPUT:

Confidence Intervals

Variable N Mean StDev SE Mean 95.0 % C.I.


C1 5 14.4000 0.1581 0.0707 ( 14.2036, 14.5964)

• Since 14 is not in the interval, reject H0.

54
EXAMPLE
Problem: At a certain production facility that assembles
computer keyboards, the assembly time is known (from
experience) to follow a normal distribution with mean 
of 130 seconds and standard deviation  of 15 seconds.
The production supervisor suspects that the average time
to assemble the keyboards does not quite follow the
specified value. To examine this problem, he measures
the times for 100 assemblies and found that the sample
mean assembly time ( x ) is 126.8 seconds. Can the
supervisor conclude at the 5% level of significance that
the mean assembly time of 130 seconds is incorrect?

55
• We want to prove that the time required to
do the assembly is different from what
experience dictates: H A :   130
• The sample mean is X  126.8
• The standard deviation is   15
• The standardized test statistic value is:
126.8  130
Z  2.13
 
15
100

56
Two-Tail Hypothesis:
H0:  Type I Error
Probability
HA: 


1- 
z=test statistic values -z z
0

Reject H0 Do not Reject Reject H0


(z<-z H0 (z>z
(-zz<z

57
X- 126.8 - 130
Test Statistic: z= = = -2.13
 15
n 100
Rejection Region

.90
 .9 
Z
-z 0 z
 

58
CONCLUSION
• Since –2.13<-1.96, it falls in the rejection
region.
• Hence, we reject the null hypothesis that
the time required to do the assembly is 130
seconds. The evidence suggests that the task
now takes either more or less than 130
seconds.

59
DECISION RULE
• Reject Ho if z < -1.96 or z > 1.96.
In terms of X , reject H0 if

15
X  130  1.96 = 127.6 06
100
15
or X  130  1.96 =132.94
100

60
P-VALUE
• In our example, the p-value is

p  value  2.P(Z  2.13)  2(0.0166)  0.0332


So, since 0.0332 < 0.05, we reject the null.

61
Calculating the Probability of Type II Error
Ho:  = 130
HA: 130

• Suppose we would like to compute the probability of not


rejecting H0 given that the null hypothesis is false (for
instance =135 instead of 130), i.e.
=P(not rejecting Ho|Ho is false).
Assuming =135 this statement becomes:
P(127.06  x  132.94|  135)
127.06-135 132.94-135
 P( Z  )
15/ 100 15/ 100
 P(-5.29  Z  -1.37)  .0853
62

You might also like