[THOUGHT]
To compute the variance of a1X, we first determine the constant a by ensuring the probability mass function sums to 1. Then, we calculate the expected value E[X] and E[X2] to find Var(X). Finally, using the property Var(cX)=c2Var(X), we compute the desired variance.
- Find a:
- Sum probabilities for x=0,1,2,3:
x=0∑312∣2x−1∣=121+121+123+125=1210=65
- Solve 65+a=1 to get a=61.
- Calculate E[X]:
E[X]=x=0∑4x⋅P(X=x)=0⋅121+1⋅121+2⋅123+3⋅125+4⋅61=25
- Calculate E[X2]:
E[X2]=x=0∑4x2⋅P(X=x)=0⋅121+1⋅121+4⋅123+9⋅125+16⋅61=215
- Compute Var(X):
Var(X)=E[X2]−(E[X])2=215−(25)2=45
- Compute Var(a1X):
Var(a1X)=(a1)2Var(X)=62⋅45=36⋅45=45
[/THOUGHT]
[PYTHON]
Calculate the constant a
prob_sum = sum(abs(2*x - 1)/12 for x in range(4))
a = 1 - prob_sum
Calculate E[X]
E_X = sum(x * (abs(2*x - 1)/12 if x < 4 else a) for x in range(5))
Calculate E[X^2]
E_X2 = sum(x**2 * (abs(2*x - 1)/12 if x < 4 else a) for x in range(5))
Variance of X
var_X = E_X2 - E_X**2
Variance of (1/a)X
var_scaled = (1/a)**2 * var_X
print(var_scaled)
[/PYTHON]