Statistics
Statistics
^I = 1 ∑ ( i ) f ( x ) dx
Va r Y ∨X ( Y |X ) =0 n
g x
P(B∨A )P ( A ) n i=1 f ( x i )
P( A∨B)= Y =E Y ∨X (Y ∨ X ) with prob one.
P (B ) PDF method to get pdf of Y =g (X ):
Choose to minimize the variance of the weights g(x)
P ( B )=P ( B| A ) P ( A ) + P ( B|¬ A ) P ( ¬ A ) Given , , find f (x)
f X ( x ) Y =g ( X ) x=g ( y ) −1
f (x)
f ( y| x ) f ( x )
| |
Continuous: , where
f X∨Y ( x| y ) = Y ∨X X
d −1 Lec3: Standard error (SE):
f Y ( y) f Y ( y )=f X ( g−1 ( y ) ) g ( y)
dy
If the function g( X) is not monotonic, you must break the range of
SE ( θ^ ) =√ Var ( θ^ )
∞
f Y ( y )= ∫ f Y ∨X ( y|x ) ⋅ f ( x ) dxX
Y into intervals where g is monotonic and sum the contributions Mean squared error (MSE):
−∞ from each interval.
^ ) 2=Var ( θ^ ) + Bias ( θ^ )2,
MSE ( θ^ )=E ( θ−θ
Marginal PDF:
1 y−b
( )
If
Y =aX +b , then f Y ( y ) = fX .
Bias ( θ^ ) =E ( θ^ ) −θ
∞
|a| a
f X ( x )=∫ f X ,Y ( x , y ) dy
,
P ( X=x and Y = y )=P ( X =x ) ⋅ P ( Y = y .) g is one-to-one so that its inverse exists and is denoted by sample)
| |
∂ w1 ∂ w1 n i=1 f (x)
…
Cov ( X ,Y ) =E [ ( X −E ( X ) ) ( Y −E ( Y ) ) ] ∂ y1 ∂ yn
Joint PDF:
J= ⋮ ⋱ ⋮ ,
Cov ( X , Y ) =E ( XY )−E ( X ) E ( Y )
Z=MAX ( X ,Y ) CDF : { [ F }Y ( z ) ]
n
∂ wn ∂ wn
Zero covariance: can still dependent in a nonlinear manner. E.g.: …
∂ y1 ∂ yn
2, Z= n
X ∼Uniform (−1 ,1 ) , Y = X MIN ( X ,Y ) CDF : 1−[ 1−F ( z ) ]
f Y ( y )=f X ( g−1 ( y ) )|J|
E [Z ]=0 , E [ Y ] =1 / 3 αβ −α z − β z
Exp: f Z= X +Y ( z )= ( e −e )
Conditional Distribution: for s.t. for some , and otherwise. β−α
y y=g ( x ) x f Y ( y )=0
Properties of conditional expectation: Estimators:
∑
,
If independent then mk = X ki μk =mk , for k =1, ... , K
X ,Y M X +Y ( t )=M X ( t ) M Y (t ) n i=1
Variance decomposition:
equality holds if and only if with g(x) is to be integrated, f(x) draw set of random numbers,
EY ∨ X ( Y |X )=EY ( Y )
(Given pdf) Approach: 1. Calculate , use them
( ) E [ X ] / E [ X 2]
1
probability one. ^I =∫ g ( x ) f ( x ) dx=E g ( x ) ,
0 f (x) f (x)
2. and the equality to represent params, substitute to X , S n.There can be different
Va r Y ( Y ) ≥ Va r X [ EY |X ( Y |X ) ]
MMEs.
where X 1 , ∼ f ( x )
Maximum likelihood estimator (MLE):
Let such that , To test for vs .
^
θ=argmax [ L ( θ| X ) ]=argmax [ l ( θ|X ) ] θ1 θ1 >θ 0 H 0 H ¿1 : θ=θ 1
Approach: find , and factorize, get
L ( X 1 , X 2 , … , X n|θ )
Approach: Get ,using , => . By L-P Lemma we have the MP test is to reject ¿
F ( θ^ ) , F ( θ^ 2 ) f X(x) Var ( θ^ ) H1
parameter out.
~
( )
So thee test with rejection region
~ Var ( θ )
n
−1
eff ( θ^ , θ )= 2 h ( X )=ex p 2∑ ( i
X −X )2
Var ( θ^ ) R=\{ x : x ≻θ0 log α \} 2σ i=1
Asymptotic confidence intervals: Is also the uniformly most powerful test for H 0=θ 0 ,…
σ un known :T =( X , s 2 )
√ ¿ ( θ ) ( θ−θ
^ ) d N ( 0 ,1 ) , n → ∞ vs ¿
H 1 : θ=θ 1
→ n −T
1
T =∑ X i , g ( T ; λ )=
Exp: λ
e , h ( X )=1
1−α ≈ P (−z ( α / 2 ) < √ ¿ ( θ^ ) ( θ−θ
Chi-square testing:
0) < z ( α / 2) )
^ i=1 λn
n
1
σ :V 1= 2 ∑ ( X i −μ ) ,V 1 ∼ χ 2 ( n )
2 2
θ^ ± z ( α / 2 )
1 σ 0 i=1 Gamma: T=
(∏ X , ∑ X )
i
i
i
i ,
n ∏
α−1
max L ( θ )
( Xi)
β
Hypothesis Testing:
L ( θ0 ) g (T ; θ)= e , h( X )
power=1−P ( Type II Error ) =1−β Λ= , Λ=
θ ∈Θ
, Λ ∈ [0 , 1]
0
( Γ (α) β ) i
L( θ)^ max L ( θ )
UMP testing: Uniformly most powerful (UMP) test. If a test of Useful equations:
θ ∈Θ
H 0 :θ=θ 0 vs H 1 : θ=θ 1 is a most powerful test for every 1. Small values of are evidence against H 0; n n
1 2
θ1 >θ 0 among all tests of size , then the test is uniformly most 2. Under some smoothness conditions, the asymptotic null distribution 2
Sn = ∑
n−1 i=1
( X i−X ) =S +(∑ X )
2 ¿2
powerful (UMP) for testing H :θ=θ vs H : θ>θ of is 2 distribution, where is the number i=1
0 0 1 1
−2 log ( Λ ) χ r −r r1 0
unbiased
UMP: W ={ x 1 :n : x< C } ,
of free parameters in Θ r is the number of free parameters in Θ
1 0 0 n n
¿2 1 1
where C is chosen such that P μ ( X <C )=α .
;
S = ∑
n i=1
X 2
i −X 2
= ∑
n i =1
( X i− X )
2 biased
{ }
2
−2σlog ( Λ ) > χ r−r ( α ) σ
σ E ( X )= + μ
2 2
Thus, C=μ1 +uα ,W = x 1: n : x< μ 1+u α . 0
n
√n √n
Design a LR Test:
Cov ( X , Y ) =Cov ( Y , X );
is the rejection region for the likelihoodlikelihood
ratioratio
test
test statistic:
Cov ( X , X )=Var ( X )
( )
Approach to finding a UMP test: Use the Neyman-Pearson Lemma to
L( θH ) Cov ( aX ,bY )=ab ⋅Cov ( X ,Y );
2
find a MP test of H 0 ≔θ0 vs H 1 ≔ θ1 for some θ1 >θ 0 λ=−2 log 0
∼ χ n , nis number of unknown
Cov ( X ,c )=0, c is constant
If the form of the test is the same for all θ , then the test is UMP. L ( θ^ )
1
Neyman-Pearson lemma: Rej if exceeds the critical value of
t n ( α )=−t n ( 1−α )
2
H0 λ χ α,1
L(θ0)
Λ ( x )= Sufficient Statistics:
L ( θ1 ) Solution Approach:
Approach:
T is θ SS ↔ f ( X 1 , X 2 , … , X n ; θ ) =h ( X 1 , X 2 ,⋯ , X n ) g ( T ; θ )
Let be independent and Let i.i.d. , Define:
∼ N ( μ ,θ 2 )
2
X1 … X k X i ∼ χn X1 , … , Xn
2 n
Y = X 1 +…+ X k ∼ χ n +…+n Sample mean: 1
1 k
X= ∑X
n i=1 i
Let then
2 2
Z ∼ N (0 , 1) X =Z = χ 1
n
Sample variance: 1
2 2
X ∼ χ ( m ) ,Y ∼ χ ( n )
: S=2
n ∑
n−1 i=1
( X i−X )
2
Common MGFs :
1 2 2
X ∼ N ( μ , σ 2 ): M X ( t )=e
( ) ( )
μt+ σ t 2
2 X/m X m n 1. σ and
∼ F ( m, n ) , ∼ Beta , X ∼ N μ,
Y /n X +Y 2 2 n
λ , for
X ∼ Exp ( λ ): M X ( t )= t <λ
λ−t T distribution: √ n ( X−μ ) / σ ∼ N ( 0 , 1 )
and be independent, then 2. and 2 n are independent.
X ∼ Poisson ( λ ) M X ( t )=e λ (e −1)
: t
2
Z ∼ N (0 , 1) U ∼ χn X SN
Z
∼t ( n−1 ) S2n
( )
−α
t: 3.
X ∼ Γ ( α , β ) M X ( t )= 1− for t< β √ U / n n ∼ χ n−1
2
β σ
2
t (x)=t(−x ), symmetric about 0
As , , by LLN
:
X ∼ Bin ( n , p ) M X ( t )=( 1− p+ p e t )
n
n → ∞ t n → N ( 0 ,1 ) 4. √ n ( X−μ ) ∼ t
2 n−1
Sn
bt at
t n has heavier tail than N (0 ,1)
e −e
X ∼ U ( a , b ) M X ( t )= F distribution F
m ,n
5. X 1 −X , … , X n−X not independent. Sum to 0. Degree
t ( b−a )
n n-1
mean: , n>2 variance:
Conversions: n−2
(∑ )
2
n n n
2 n ( m+ n−2 )
Sn = ∑ X i ∼ N μi , ∑ σ
Normal: 2
i ,n> 4
i=1 i=1 i=1 m ( n−2 )2 ( n−4 )
(∑ )
n n Gamma:
Sn=∑ X i ∼ Poisson
Poisson:
λi α Converge almost surely.
i=1 i=1
( ) β α −1 −β x
f x ;α , β = x e for x >0 ,∧α , β >0.
Γ (α ) (
P lim |Z n−Z|< ϵ =1
n →∞ )
1
( )
Exponential: , all are the same.
Sn ∼ Γ n , λi Converge in probability.
λ E ( X )=α / β , D ( X )=α / β
2
α X
[ ( )]
2
1 x−μ Var ( X )= =S → β= 2 , α = X lim F n ( z )=F ( z )
N ( μ , σ ) F ( x )= 2 1+ erf
2 : 2
β S n→∞
σ √2
( )
−α
t
: − λx M X ( t )= 1− for t< β
exp ( λ ) F ( x )=1−e for x ≥ 0 β
( )
k Method for Integration by Parts:
λi 1
Poisson ( λ ) F ( k )=e− λ ∑
: Note:
exp ( λ)≡ Γ 1 ,
i! λ ∫ u dv =u ⋅v−∫ v du
, is easy to integral
i=0 v
k −k
() ( )
−α Look at the tables:
Bin(n , p) F ( k )=∑ n p ( 1− p ) t
, i n−i 2
M X ( t )= 1− to M X ( t )=( 1−2t ) z ( α / 2 ) is upper 2 quantile in N ( 0 , 1 )
i=0 i β
Others: P-value: In null-hypothesis significance testing, the
Chi-square distribution 2:
χ
( ) k 1 p-value is the probability of obtaining test results at least as extreme as
n
X ∼ χ2 ( k ) → X ∼ Γ ,
Special case of Gamma distribution,
2 2 the result actually observed, under the assumption that the null
hypothesis is correct.
For a chi-square distribution converted to a gamma distribution:
( n2 , 12 ) τ.
Find the form of an approximate confidence interval for
χ 2n =Gamma Distributions of sample mean and sample variance.
τ^ ∼ N τ , ( nτ^ )
( 1−α ) 100 % asymptotic C.I. is τ^ ± Z α / 2 ⋅ ( τ^
√n )
If two estimators not unbiased, use their MSE (divide) Exact Pivots :
Exponential:
( )
n
nS nS
Y = λ ∑ X i ; CI : 2
,
i=1 χ 1−α / 2 , n χ 2α / 2 ,n
Y −nλ
Poisson: Z= CI : ( nλ ± z α / 2 √ nλ )
√ nλ
Binomial:
Z=
X −np
√np ( 1−p )
, CI : p ± z α / 2 (
p ( 1− p )
n √ )