Basic Concepts of Inference: Corresponds To Chapter 6 of Tamhane and Dunlop
Basic Concepts of Inference: Corresponds To Chapter 6 of Tamhane and Dunlop
Basic Concepts of Inference: Corresponds To Chapter 6 of Tamhane and Dunlop
Corresponds to Chapter 6 of
Tamhane and Dunlop
Statistical Inference
Deals with methods for making statements about a population based on
a sample drawn from the population
2
Examples
3
Two Levels of Statistical
Inference
4
Estimation Problems
5
Point Estimation Terminology
Estimator = the random variable (r.v.) θˆ , a function of the Xi’s
(the general formula of the rule to be computed from the data)
Estimate = the numerical value of θˆ calculated from the
observed sample data X1 = x1, ..., Xn = xn
(the specific value calculated from the data)
Example: Xi ~ N(µ,σ2) n
∑X
µ̂
i
Estimator = X= i =1 is an estimator of µ =
n
n
∑x i
Estimate = x = i =1 (= 10.2) is an estimate of µ
n
Other estimators of µ? 6
Methods of Evaluating Estimators
Bias and Variance
Bias(θˆ) = E (θˆ) − θ
- The bias measures the accuracy of an estimator.
- An estimator whose bias is zero is called unbiased.
- An unbiased estimator may, nevertheless, fluctuate greatly from
sample to sample.
ˆ ˆ{
Var (θ ) = E [θ − E (θ )]
ˆ 2
}
-The lower the variance, the more precise the estimator.
- A low-variance estimator may be biased.
- Among unbiased estimators, the one with the lowest variance
should be chosen. “Best”=minimum variance.
7
Accuracy and Precision
Bias(θˆ) = E (θˆ) − θ
ˆ {
Var (θ ) = E [θ − E (θ )]
ˆ ˆ 2
}
9
Example: estimators of variance
S = ∑i =1 ( X i − X ) 2 ( n − 1)
2 n
1 is unbiased (Example 6.3)
S = ∑i =1 ( X i − X ) 2 n
n
2
2
is biased but has smaller MSE
(Example 6.4)
11
Standard Error (SE)
- The standard deviation of an estimator is called the standard
error of the estimator (SE).
- The estimated standard error is also called standard error (se).
- The precision of an estimator is measured by the SE.
Examples for the normal and binomial distributions:
1. X is an unbiased estimator of µ
SE ( X ) = σ n
are called the standard error of the mean
se( X ) = s n
2. pˆ is an unbiased estimator of p
se( pˆ ) = pˆ (1 − pˆ ) n
12
Precision and Standard Error
13
Methods of Point Estimation
14
Method of Moments
• Equate sample moments to population moments (as we did with
Poisson).
• Set X = (b+a)/2
• S2 = (b-a)2/12
15
Maximum Likelihood Parameter
Estimation
16
MLE (continued)
•If X1….Xn are iid then
L(θ|x)=f(x1…xn| θ) = ∏ f(xi| θ)
⎡ σ σ ⎤
⇒ P ⎢ L = X − 1.96 ≤ µ ≤ U = X + 1.96 ⎥ = 0.95
⎣ n n⎦
σ σ
⇒ l = x − 1.96 ≤ µ ≤ x + 1.96 = u is a 95% CI for µ
n n (two-sided)
• See Example 6.7, Airline Revenues, p. 204
19
Normal Distribution, 95% of area under
curve is between -1.96 and 1.96
0.4
0.3
dnorm(x)
95%
0.2
0.1
0.0
-3 -2 -1 0 1 2 3
x
20
This graph was created using S-PLUS(R) Software. S-PLUS(R) is a registered trademark of Insightful Corporation.
Frequentist Interpretation of CI’s
In an infinitely long series of trials in which repeated
samples of size n are drawn from the same population
and 95% CI’s for µ are calculated using the same method,
the proportion of intervals that actually include µ will be
95% (coverage probability).
However, for any particular CI, it is not known whether or
not the CI includes µ, but the probability that it includes µ
is either 0 or 1, that is, either it does or it doesn’t.
It is incorrect to say that the probability is 0.95 that the true
µ is in a particular CI.
• See Figure 6.2, p. 205
21
95% CI, 50 samples from unit normal
distribution
1.0
0.5
95% Confidence Interval
0.0
-0.5
-1.0
0 10 20 30 40 50
22
This graph was created using S-PLUS(R) Software. S-PLUS(R) is a registered trademark of Insightful Corporation.
Arbitrary Confidence Level for CI: σ known 2
For large samples, these CI can be used for data from any
distribution, since by CLT x ≈ N(µ, σ2/n).
23
One-sided Confidence Intervals
σ
µ ≥ x − Zα Lower one-sided CI For 95%
n confidence,
σ Zα= 1.645 vs.
µ ≤ x + Zα Upper one-sided CI
Zα/2= 1.96
n
24
Hypothesis Testing
26
Hypothesis Tests
• A hypothesis test is a data-based rule to decide between H0
and H1.
• A test statistic calculated from the data is used to make this
decision.
• The values of the test statistics for which the test rejects H0
comprise the rejection region of the test.
• The complement of the rejection region is called the
acceptance region.
• The boundaries of the rejection region are defined by one or
more critical constants (critical values).
• See Examples 6.13(acc. sampling) and 6.14(SAT coaching),
pp. 210-211.
27
Hypothesis Testing as a Two-Decision Problem
Framework developed by Neyman and Pearson in 1933.
When a hypothesis test is viewed as a decision procedure,
two types of errors are possible:
Decision
Do not reject H0 Reject H0
Correct Decision Type I Error
H0 True
“Confidence” “Significance Level” =1
Reality
1-α α
Type II Error Correct Decision
H0 False
“Failure to Detect” “Prob. of Detection” =1
β 1-β
Column
Total ≠1 ≠1
28
Probabilities of Type I and II Errors
α = P{Type I error} = P{Reject H0 when H0 is true} = P{Reject H0|H0}
also called α-risk or producer’s risk or false alarm rate
29
Example 6.17 (SAT Coaching)
30
Power Function and OC Curve
The operating characteristic function of a test is the probability
that the test fails to reject H0 as a function of θ, where θ is the
test parameter.
OC(θ) = P{test fails to reject H0 | θ}
For θ values included in H1 the OC function is the β –risk.
The power function is:
π(θ) = P{Test rejects H0 | θ} = 1 – OC(θ)
Example: In SAT coaching, for the test that rejects the null
hypothesis when mean change is 25 or greater, the power
= 1-pnorm(25,mean=0:50,sd=40/sqrt(20))
31
Level of Significance
The practice of test of hypothesis is to put an upper bound on the
P(Type I error) and, subject to that constraint, find a test with the lowest
possible P(Type II error).
The upper bound on P(Type I error) is called the level of significance of
the test and is denoted by α (usually some small number such as 0.01,
0.05, or 0.10).
The test is required to satisfy:
Motivated by the fact that the Type I error is usually the more serious.
A hypothesis test with a significance level α is called an a α-level test.
32
Choice of Significance Level
What α level should one use?
Recall that as P(Type I error) decreases P(Type II error)
increases.
A proper choice of α should take into account the relative costs
of Type I and Type II errors. (These costs may be difficult to
determine in practice, but must be considered!)
Fisher said: α =0.05
35
One-sided and Two-sided Tests
H0 : µ = 15 can have three possible alternative hypotheses:
H1 : µ > 15 , H1 : µ < 15 , or H1 : µ ≠ 15
(upper one-sided) (lower one-sided) (two-sided)
36
Example 6.27 continued
37
Relationship Between Confidence Intervals
and Hypothesis Tests
An α-level two-sided test rejects a hypothesis H0 : µ = µ0 if and
only if the (1- α)100% confidence interval does not contain µ0.
38
Use/Misuse of Hypothesis Tests in Practice
39
Jerzy Neyman Egon Pearson
(1894-1981) (1895-1980)
40