Escolar Documentos
Profissional Documentos
Cultura Documentos
Way Too
No Data Some Data Much Data
Inferential Descriptive
Probability Statistics Statistics
Residual(i) 1.0
= X(i) – X 0.5
x2 - ave
0.0
Σi Residual(i) = 0 -0.5
-1.0
1 1 55
1 00 10
variance=2/3 variance=1/3 std error=√(1/3)=0.58
2.0 00 1.5
mean=2/3
1.5 1.0 44
1.0 0.5 7777
0.5 5555 0.0 000
0.0 000
For with-replacement ... for the sampling
sampling from {1,2,3}, distribution of the
the sampling distribution standard deviation
of the variance when n=2. when n=2.
= n(1–1/n)2 σ2 + n(n–1)σ2/n2
= ((n–1)2/n)σ2 + ((n–1)/n)σ2 = σ2×((n–1)/n)((n–1)+1)
= σ2×(n–1)
Stat 110 bheavlin@stat.stanford.edu
Comments on why n–1
1. If X, Y are independent,
Var(X+Y) = Var(X) + Var(Y).
2. { X(i)} independent, each with variance σ2,
Var(Σi X(i)) = n σ2.
3. { X(i)} independent, each with variance σ2,
Var(X) = σ2/n.
4. If { X(i)} are independent with mean μ and
variance σ2, the sample variance (with n–1 in
the denominator) is unbiased.
D. Weigh the
(W+ + W–)/2 = apple
apple+orange= W+.
Weigh the apple–orange (W+ – W–)/2 = orange
=W–. Var((W+.±W–)/2) =
(?) (1/2)2 × (σ2+σ2) = σ2/2
Stat 110 bheavlin@stat.stanford.edu
The sampling distribution of p-values
Assume an 1
underlying
0.8
continuous
w=CDFY(y)
distribution: 0.6
P(W≤w)=FY(y(w)) 0.4
=FY(FY-1(w))=w 0.2
0 .2 .4 .6 .8 1 1.2
y
gamma(alpha=2)
with mean=1. The sum of two
0.2
exponentials(λ=1) has
distribution gamma(α=2,λ=1). 0.1 3%
–ln(0.06)–ln(0.08)
0.0
=2.81+2.53
0 1 2 3 4 5 6 7 8
=5.34
P(gamma(α=2,1)≥5.34)=0.03 = the combined p-value
Stat 110 bheavlin@stat.stanford.edu
Normal approximation to binomial
lower tail:
P(S ≤ a) ≈ P( Z ≤ (a+0.5–np)/√np(1–p) )
upper tail:
P(S ≥ b) ≈ P( Z ≥ (b–0.5–np)/√np(1–p) )
interval:
P(a≤S≤b) ≈ P((a–0.5–np) ≤ Z ≤ (b+0.5–np))
√np(1–p) √np(1–p)
s/[1 ± 2/(2ν)1/2]
±2 standard errors
Stat 110 bheavlin@stat.stanford.edu
Tukey’s dilemma
William Gosset
0.4
normal “Student”
0.3
0.2
Y
0.1
t-dist
t = z /[ χ2/ν ]1/2 is distributed as
0
a Student’s t distribution
-5 -4 -3 -2 -1 0 1 2 3 4 5
with ν degrees of freedom.
z-score units
Stat 110 bheavlin@stat.stanford.edu
A process monitoring problem
n = 4, s = 0.03 oz, μ is either 0 (on target) or +0.02
oz from target. Degrees of freedom=3.
Specification requires | x | ≤ 0.03. What is the
probability of observing this?
P( –0.03≤ x ≤ +0.03 ) = P(–.03–μ ≤ x–μ ≤ .03–μ)
= P( (–.03–μ)/(s/√n) ≤ (x–μ)/(s/√n) ≤ (.03–μ)/(s/√n) )
= P( (–.03–μ)/(s/√n) ≤ t ≤ (.03–μ)/(s/√n) )
= P( (–.03–μ)/0.015 ≤ t ≤ (.03–μ)/0.015 )
= P(–2.00 ≤ t ≤ +2.00 | μ= 0.00) = 0.861 or
= P(–3.33 ≤ t ≤ +0.67 | μ=+0.02) = 0.701
Stat 110 bheavlin@stat.stanford.edu
Operating Characteristic
n = 4, ν = 3, 1.0
s = 0.03 oz, 0.9 P(| x | ≤ 0.03 )
0.8
P(| x | ≤ 0.03 )
0.7
as a function of μ. 0.6
0.5
0.4
0.3
0.2
0.1
0.0
-0.10 -0.05 .00 .05 .10
true μ
Stat 110 bheavlin@stat.stanford.edu
More realistic formulation
n = 4, s = 0.03 oz, x =+0.02 oz from target. From
this data, what is a reasonable range of μ?
0.95 = P(tν=3(0.025) ≤ t ≤ tν=3(0.975))
= P(tν=3(0.025) ≤ (x–μ)/(s/√n) ≤ tν=3(0.975))
= P(tν=3(0.025)×(s/√n)≤ x–μ ≤ tν=3(0.975)×(s/√n))
= P( x–tν=3(0.975)×(s/√n)≤ μ ≤ x–tν=3(0.025)×(s/√n))
= P( x–tν=3(0.975)×(s/√n)≤ μ ≤ x+tν=3(0.975)×(s/√n))
= P(0.02–3.182×(0.03/2)≤ μ≤0.02+3.182×(0.03/2))
= P( –0.0277 ≤ μ ≤ 0.0677 )
Stat 110 bheavlin@stat.stanford.edu
overetch yield experiment (reprised)
one-sample problem
• Example is 5 “split” lots, each paired to their
personal control groups.
• Ultimately depend on deltas, one column of
values.
two-sample problem
• One group’s values do not pair to any particular
subset of the second group’s values.
paired two-sample
• mean diff = –7.2 • mean diff = –7.2
• n=5, df=4, • n1+n2=10, df=8,
s =11.52 s =13.09
• stderr2 multiplier • stderr2 multiplier
=(1/5) =0.2 =(1/5 + 1/5) =0.4
• 95% confidence • 95% confidence
interval –7.2 ± 14.3 interval –7.2 ± 19.1
paired two-sample
–fewer degrees of +more degrees of
freedom freedom
one-sample two-sample
χ12/ν1 s1 2
F = =
χ22/ν2 s2 2
is distributed as F with
Let χ12 and χ22 be numerator degrees of
independent chi- freedom ν1 and
squares with ν1 and ν2 denominator degrees of
degrees of freedom, freedom ν2.
= P(F(ν2,ν1)>9/(σ22/σ12)) 0.4
0 1 2 3 4 5