Uiversity of Ljubljaa, Faculty of Ecoomics Quatitative fiace ad actuarial sciece Probability ad statistics Writte examiatio September 4 th, 217 Name ad surame: Istructios Read the problems carefull before starig your work There are four problems You ca have a sheet with formulae ad a mathematical hadbook Write your solutios o the paper provided You have two hours ID: Problem a b c d 1 2 3 4 Total Solutios
1 (25) Ofte it is difficult to obtai hoest aswers from sample subjects to questios like Have you ever used heroi or Have you ever cheated o a exam To reduce bias the method or radomized respose is used The sample subject is give oe of the two statemets below at radom: (1) I have property A (2) I do ot have property A The subject respods YES or NO to the give questio The pollster does ot kow to which of the two statemets the subject is respodig We assume: Let The subjects are a simple radom sample of size from a larger populatio of size N The statemets are assiged to the chose subjects idepedetly The assigmet of statemets is idepedet of the samplig procedure The subjects respod hoestly to the statemets they are give p be the probability the a subject will be assiged the statemet (1) This probability is kow ad is part of the desig q be the proportio of subjects i the populatio with property A r be the probability that a radomly selected subject respods YES to the statemet assiged R be the proportio of subjects i the sample who respod YES a (1) Compute the probability r that a radomly selected subject i the populatio respods YES to the statemet assiged Show that R is a ubiased estimate of r Take ito accout that the assigmet of statemets is idepedet of the selectio procedure Solutio: The probability that a radomly selected subject i the has property A is q The assigmet of statemets is radom ad idepedet of the samplig procedure which meas that the subject is assiged statemet (1) with probability p idepedetly from whether it has property A or ot Sice we assume that the subjects give a hoest aswer, the coditioal probability that the subject respods YES give that she is assiged statemet (i) is q Similarly if the subject is assiged statemet (2) the coditioal probability the she will repod YES is 1 q By the law of total probabilities we have that r = pq+(1 p)(1 q) = 1 p q + 2pq To see that R is a ubiased estimator of r write R = 1 i=1 I iwhere I i is the idicator of the evet that the i-th subject i the sample respods YES Above we have show that E(I i ) = P (I i = 1) = r which proves the claim b (5) Suggest a ubiased estimator of q Whe is this possible? Express the variace of the estimator with var(r) Solutio: We have q = p + r 1 2p 1, 2
which suggests that Q = p + R 1 2p 1 is a plausible choice We have show that R is a ubiased estimator of r By liearity of expectatio Q is ubiased The above is oly possible if p 1/2 If p = 1/2 we ote that a give subject will repod YES with probability 1/2 irrespective of the value of q Whatever expressio we take its expectatio will ot deped o q which meas that it caot be a ubiased estimator For the variace we compute var(q) = var(r) (2p 1) 2 c (1) Let N Y be the umber of sample subjects who respod YES to the questio ad N A a umber of sample subjects who have property A Assume as kow that var(n Y ) = p(1 p) + (2p 1) 2 var (N A ) Compute var(r) Use this to give the stadard error of the ubiased estimator of q Hit: what quatity does N A / estimate? Solutio: By formulae for simple radom samplig we have var( A ) = N q(1 q), N 1 Takig ito accout that R = Y / we fially get var(r) = p(1 p) + N N 1 From this the stadard error is derived easily (2p 1) 2 q(1 q) 3
2 (25) Assume the observed values x 1, x 2,, x were geerated as radom variables X 1, X 2,, X with desity for x, µ > f(x) = 1 (1 µx)2 e 2x 2πx 3 a (5) Fid the maximum likelihood estimate of µ Rešitev: Zapišemo logaritemsko fukcijo verjetja kot l = 2 log 2π 3 (1 µx k ) 2 log x k 2 2x k Odvajaje po µ am da eačbo (1 µx k ) = Iskaa ceilka je torej ˆµ = x 1 + x 2 + + x = 1 x b (5) Ca you fix the maximum likelihood estimator to be ubiased? Assume as kow: The desity of X 1 + + X is for x > f (x) = ( µx)2 e 2x 2πx 3 Assume as kow that for a, b > we have x 5/2 e ax b x dx = π ( 1 + 2 ab ) Rešitev: Naj ima X gostoto f (x) Račuamo ( ) 1 E = X x f (x) dx = 2 eµ 2π 2b 3/2 x 5/2 e µ2 2 x 2 2x dx = 2 eµ 1 + µ 2π e µ 2π 3 = µ + 1 e 2 ab 4
Nepristraska ceilka bi bila torej µ = 1 X 1 c (1) Compute the variace of the maximum likelihood estimator of µ Assume as kow that for a, b > we have ( ) π 3 + 6 ab + 4ab x 7/2 e ax b x dx = e 2 ab 4b 5/2 Rešitev: Za slučajo spremeljivko X z gostoto f (x) račuamo ( ) 2 2 E = X 2 x f (x) dx 2 Variaca je torej eaka = 3 eµ 2π x 7/2 e µ2 2 x 2 2x dx = 3 eµ 2π(3 + 3µ + 2 µ 2 ) e µ 2π 5 = 3 2 + 3µ + µ2 var(ˆµ) = E(ˆµ 2 ) ( E(ˆµ) ) 2 = µ + 2 2 d (5) What approximatio the the stadard error of the maximum likelihood estimator do we get if we use the Fisher iformatio? Assume as kow that x 1/2 e ax b x dx = π a e 2 ab Rešitev: Z odvajajem dobimo, da za = 1 velja Sledi, da je l = x I(µ) = E(X) = eµ 1 e µ2 x 2 1 2x dx 2π x = eµ 2π 2πµe µ = 1 µ 5
Aproksimacija variace po Fisherju je torej µ, kar je vodili čle v izrazu za pravo variaco 6
3 (25) Gauss s gamma distributio is give by the desity 2λ f(x, y) = π y e y e λy(x µ) 2 2 for < x < ad y > ad (µ, λ) R (, ) Assume that the observatios are pairs (x 1, y 1 ), (x 2, y 2 ),, (x, y ) geerated as idepedet radom pairs (X 1, Y 1 ),, (X, Y ) with desity f(x, y) We would like to test H : µ = versus H 1 : µ a (15) Compute the maximum likelihood estimates of the parameters Compute the maximum likelihood estimate of λ whe µ = Rešitev: Logaritemska fukcija verjetja je l = ( ) 2λ 2 log + π (log y k y k ) λ 2 y k (x k µ) 2 Parciale odvode izeačimo z i dobimo eačbi 2λ 1 2 y k (x k µ) 2 = i Iz druge eačbe sledi, da je λ y k (x k µ) = ˆµ = x ky k y k Vstavimo lahko v prvo eačbo i sledi ˆλ = y k(x k ˆµ) 2 V primeru, ko privzamemo µ =, je ustreza ceilka določea prav s prej omejeo prvo eačbo Vajo torej vstavimo µ = i dobimo ceilko λ = x2 k y k b (1) Fid the likelihood ratio statistics for the above testig problem What is its approximate distributio uder H? 7
Rešitev: Testa statistika je eaka [ ] λ = 2 l(ˆλ, ˆµ x, y) l( λ, x, y) = (log ˆλ log λ) ˆλ y k (x k ˆµ) 2 + λ x 2 ky k Toda iz eačb, iz katerih smo dobili ceilke, sledi ˆλ y k (x k ˆµ) 2 = λ x 2 ky k =, torej je kar λ = log ˆλ λ Po Wilksovem izreku je aproksimativa porazdelitev te statistike, če H eaka χ 2 (1) drži, 8
4 (25) Assume the regressio model Y = Xβ + ɛ, where E(ɛ) = ad var(ɛ) = σ 2 V Assume V is a ivertible symmetric matrix Assume that X is of the form 1 x 1 1 x 2 X = 1 x with x k =, ad the kow matrix V of the form with ρ 1/( 1) ad ρ 1 V = (1 ρ)i + ρ11 T a (5) Show that ˆβ = ( X T V 1 X ) 1 X T V 1 Y is the best ubiased liear estimator of β Rešitev: Regresijsko eačbo pomožimo a obeh straeh z V 1/2 i ozačimo Ỹ = V 1/2 Y i podobo za X ter ɛ S tem regresijski model prevedemo a stadardo obliko i po izreku Gauss-Markova lahko zapišemo zgorjo ceilko, ki je ajboljša b (1) Show that the best liear ubiased estimator of β is just the usual ordiary least squares estimator that we get assumig that V = I Hit: the iverse matrix V 1 is of the form ai + b11 T Rešitev: Z možejem dobimo V ( ai + b11 T ) = a(1 ρ)i + aρ11 T + b(1 ρ)11 T + bρ11 T 11 T Poeostavimo v Sledi, da je Račuamo i podobo a(1 ρ)i + (aρ + b(1 ρ) + bρ)11 T V 1 = 1 1 ρ I ρ (1 ρ)(1 + ( 1)ρ) 11T X T V 1 X = ( ) a + b 2 a x2 k ( (a + b) X T V 1 Y = Y ) k a x ky k 9
Sledi ( ) Ȳ ˆβ = x ky k / x2 k To ceilko bi dobili v primeru, če bi bilo V = I c (1) Compute ( ) E ˆɛ 2 k Hit: for a arbitrary vector a we have a T a = Tr(aa T ), ad for matrices A ad B we have Tr(AB) = Tr(BA) Rešitev: Račuamo E ( ˆɛ 2 k ) = E (ˆɛ T ˆɛ ) = E ( )) T Tr (ˆɛˆɛ = Tr (var(ˆɛ)) = Tr ( σ 2 (I H)V(I H) ) = Tr ( σ 2 V(I H)(I H) ) = Tr ( σ 2 V(I H) ) = σ 2( Tr (V) Tr(VH) ), kjer je H = X ( X T X ) 1 X T Preprosto je videti, da je Tr (V) = Nadalje je Tr (VH) = Tr ( (1 ρ)h + ρ11 T H ) = 2(1 ρ) + ρ 1 T H1 = 2(1 ρ) + ρ 1 T X ( X T X ) 1 X T 1 = 2(1 ρ) + ρ ( ) ( ) 1 ( ) 1 x2 k = 2(1 ρ) + ρ Sledi ( ) E = ( 2)(1 ρ)σ 2 ˆɛ 2 k 1