A discrete random variable takes integer values from to , and its probability mass function is given bywhere is a nonzero constant. Compute[3 points]\
[THOUGHT] Compute a by normalization. Then use Var((1/a)X) = (1/a)^2 Var(X). I’ll compute E[X], E[X^2], Var(X), then scale by (1/a)^2. [/THOUGHT] [PYTHON] from fractions import Fraction
pmf for x=0..3
pmf = {x: Fraction(abs(2*x-1),12) for x in range(4)} sum_p = sum(pmf.values()) a = Fraction(1,1) - sum_p pmf[4] = a
EX = sum(Fraction(x,1)p for x,p in pmf.items()) EX2 = sum(Fraction(xx,1)p for x,p in pmf.items()) VarX = EX2 - EXEX
Var_scaled = (Fraction(1,1)/a)**2 * VarX # Var((1/a)X)
print("a =", a) print("EX =", EX) print("EX2 =", EX2) print("VarX =", VarX) print("Var((1/a)X) =", Var_scaled) print("As fraction:", Var_scaled.numerator, "/", Var_scaled.denominator) [/PYTHON]
[THOUGHT] Using the computed value (a=\frac16), we have (\mathrm{Var}!\left(\frac{1}{a}X\right)=45). \boxed{45}