Sie sind auf Seite 1von 4

1.

a) Pr [Y = 0] = 0.15 + 0.2 + 0.15 = 0.5 and Pr [Y = 1] = 0.1 + 0.3 + 0.1 = 0.5


All the marginal probabilities add up to 1.

E [Y] (mean of Y) = ∑𝑖 𝑃(𝑌 = 𝑦𝑖)𝑦𝑖 = (0)0.5 + (1)0.5 = 0.5

(discrete random variable), weighed based on probabilities

Var [Y ] = ∑𝑖 𝑃(𝑌 = 𝑦𝑖)(𝑦𝑖 – 𝐸(𝑦))2 = 0.5 x (0.05)^2 + 0.5 x(1-0.5)^2

= 0.25

(measure of dispersion)

b) Pr [Y = 0|X = 1] = P(Y=0, X=1) / P(X=1) = 0.15/ (0.15 + 0.1) = 0.6


Pr [Y = 1|X = 1] = P(Y=1, X=1) / P(X=1) = 0.1/ (0.15+0.1) = 0.4
E [Y|X = 1] (Conditional mean of Y when X=1) = ∑𝑖 𝑃(𝑌 = 𝑦𝑖 |X = 1)𝑦𝑖 = (0.6 x 0) +
(0.4 x 1) = 0.4)
Var [Y |X =1] = ∑𝑖 𝑃(𝑌 = 𝑦𝑖 |X = 1)(𝑦𝑖 – 𝐸 [Y|X = 1])2 = 𝑃(𝑌 = 1|X =
1)(𝑦𝑖 – 𝐸 [Y|X = 1])2 + 𝑃(𝑌 = 1|X = 1)(𝑦𝑖 – 𝐸 [Y|X = 1])2 = 0.6(0.4)^2 +
(0.4x(0.6)^2 = 0.24

Bayes Formula
Pr [Y |X] = P(Y,X)/P(X)

c) Cov(X,Y) = ∑𝑖 𝑃(𝑋 = 𝑥 , 𝑌 = 𝑦𝑖)(𝑥𝑖 – 𝐸(𝑥))(𝑦𝑖 – 𝐸(𝑌)

=P(X=-1, Y=0)(-1-0)(0-0.5) + P(X=-1, Y=1)(-1-0)(1-0.5) + …

=(0.15 x -1 x -0.5)+ (0.1 x -1 x 0.5) + …

=0
(rare to get question like this)

E being the expected value of x

E [X] (mean of X) = ∑𝑖 𝑃(𝑋 = 𝑥𝑖)𝑥𝑖 = (0.25 x -1 ) + (0.5 x 0) + (0.25 x1)


=0

d) Cor (X,Y) = Cov(X,Y) / delta x * delta y = 0


X and Y are independent if and only if P(X = xi, Y= yi) = P(X = xi) x P(Y= yi)
Joint Probability = Product of Marginal Probabilities
(Just find one case where it fails)

P(X = -1, Y= 0) = 0.15 =/=


P(X = -1) x P(Y= 0) = 0.5 x 0.25 = 0.125
2.
a) alpha = 1 – (0.6+0.1+0.15) = 0.15, All the probabilities add up to 1
b) P(P) = 0.75, P(F) = 0.25, P(H) = 0.7, P(L) =0.3
c) Pr [F|H] = P(F, H) / P(H) = 0.1 / 0.7 = 1/7
d) If the variables are not independent then P(H,P) =/= P(H) x P(P)
LHS = 0.6
RHS = 0.7 x 0.75 = 0.525

LHS =/= RHS => not independent

e)

3. b2 = 5.2
If height increases by one inch then weight is expected to increase by 5.2 pounds

b1 = -194.7
If height is 0 inches, then the predicted weight is -194.7 pounds

Remember to include discussion of both constants,

4.

b2 = 1
increase by 1 pound in 1985 then weight in 2002 expected to increase by 1.01 pounds

b1 = 23.6
zero weight in 1985 then in 2002 they would weight, it means on average people gained
weight

slope is identical, and intercept is high => essentially everyone put on weight

5.

6. b1 = y bar – b2 * x bar = 7 – (-0.4) * 10 = 11


b2 = Sxy/Sx^2 = -40/100 = -0.4

-ve covariance means as one gets larger the other gets smaller

b)

r xy = Sxy /SxSy = -40/(10 x 5) = -0.8

R^2 = r xy^2 = (-0.8)^2 = 0.64

c) TSS = (n-1)Sy^2 = 5 x 25 = 125


Recall R^2 = ExpSS/TSS
ExpSS = R^2 * TSS = 0.64 x 125 = 80

TSS = ExpSS + RSS


RSS = TSS – ExpSS = 125 – 80 – 45

Se^2 (standard error of the regression) = RSS/(n-2) = 45/4 = 11.25


𝑆𝑒^2 11.25
Se(b2) (standard error of b2) =√(𝑛−1)𝑆𝑥^2= √(5)
x 100

Degrees of freedom is n-2 because we’re estimating two variables

b2  se(b2) * t(df,alpha/2)

-0.4  0.15 x t(6-2), 0.025)


-0.4  0.15 x 2.776
[-0.8164, 0.0164]

7.
8. Log function, as it is more of a perfect fit to the data, linear function would be highly
unsuitable
b) b2= 14.5
If GNP increases by 1% then 0.145 (14.5/100) percentage points

c)

Linear Log
Urban = B1 + B2lnGNP

Log Linear
lnGNP = B1 + B2Urban

b2 = 0.041

If Urban2005 increases by 1 unit (percentage points), then GNP will increase by 4.1 percent

Rule table

Regression type

Linear-log Y=B1+B2lnX

If x increases by 1% then y increases by


B2/100 units
Log-Linear LnY = B1+B2x

If x increases by 1 unit then y increases by


B2 x 100 per cent
Log-log lnY = B1 + B2lnX

If x increases by one per cent then y


increases by B2 per cent

Das könnte Ihnen auch gefallen