Porisma

Worked solution

Put the squared deviation inside the expectation

Alex and his friend stand randomly in a queue with three other people. X is the number of people between Alex and his friend.

(i) Show that P(X=2)=0.2P(X=2)=0.2.

(ii) Tabulate the distribution of X.

(iii) Find E(X)E(X) and E[(X−1)2]E[(X-1)^2]. Hence find Var⁡(X)\operatorname{Var}(X).

[2017/ACJC/II/6]

CJC · Discussion · Question 4

Answer

(i) 0.2; (ii) probabilities 0.4,0.3,0.2,0.1 at 0,1,2,3; (iii) E(X)=1E(X)=1, E[(X−1)2]=1E[(X-1)^2]=1, variance 1.

(i) Two positions for a two-person gap

Let A be Alex, F the friend and* one of the other people. The source patterns are A**F* and *A**F. Each allows two A/F orientations and 3!3! orders of the others. Since all 5!5! queues are equally likely, P(X=2)=2(2×3!/5!)=0.2P(X=2)=2(2\times3!/5!)=0.2.

How did this part go?

(ii) Retain every source position pattern

xPatterns with A before FP(X=x)P(X=x)
0AF***, *AF**, **AF*, ***AF4(2×3!/5!)=0.44(2\times3!/5!)=0.4
1A*F**, *A*F*, **A*F3(2×3!/5!)=0.33(2\times3!/5!)=0.3
2A**F*, *A**F2(2×3!/5!)=0.22(2\times3!/5!)=0.2
3A***F2×3!/5!=0.12\times3!/5!=0.1

The orientation factor 2 includes the F-before-A arrangements as well. The source probability table is thus 0,1,2,3 with probabilities 0.4,0.3,0.2,0.1.

How did this part go?

(iii) Mean and direct squared-deviation method

E(X)=0(0.4)+1(0.3)+2(0.2)+3(0.1)=1E(X)=0(0.4)+1(0.3)+2(0.2)+3(0.1)=1. Then E[(X−1)2]=(0−1)2(0.4)+(1−1)2(0.3)+(2−1)2(0.2)+(3−1)2(0.1)=1E[(X-1)^2]=(0-1)^2(0.4)+(1-1)^2(0.3)+(2-1)^2(0.2)+(3-1)^2(0.1)=1.

How did this part go?

(iii) Source alternative: expand inside the expectation

E[(X−1)2]=E(X2−2X+1)=E(X2)−2E(X)+E(1)=[02(0.4)+12(0.3)+22(0.2)+32(0.1)]−2(1)+1=1E[(X-1)^2]=E(X^2-2X+1)=E(X^2)-2E(X)+E(1)=[0^2(0.4)+1^2(0.3)+2^2(0.2)+3^2(0.1)]-2(1)+1=1.

How did this part go?

(iii) Recognise the variance

Since the mean μ=1, Var⁡(X)=E[(X−μ)2]=E[(X−1)2]=1\operatorname{Var}(X)=E[(X-\mu)^2]=E[(X-1)^2]=1. The source typesets E(X−1)2E(X-1)^2, but its substitutions and variance identity place the square inside the expectation, as written explicitly here. The square of E(X−1)E(X-1) would instead be 0.

How did this part go?

Common mistakes

The intended squared-deviation expectation is E[(X−1)²], not [E(X−1)]².

Solution notes

Every printed queue pattern, factor, table entry and both squared-deviation methods retained. Source E(X−1)² typography is clarified by the working/variance identity; native text preserved verbatim. No printed marks.

Read the hint