Skip to content

9709 · 6.3

Continuous random variables — practice questions

Practice and worked examples for 9709 Continuous random variables. Short previews only — attempt the full question in MarkScheme against the official scheme.

Worked example 1

A continuous random variable X has a probability density function given by f(x)=k(4x2)f(x) = k(4-x^2) for 0x20 \le x \le 2, and f(x)=0f(x) = 0 otherwise.

(i) Show that k=316k = \frac{3}{16}. (ii) Find P(X>1)P(X > 1).

Show solution outline

(i) For f(x)f(x) to be a valid PDF, the total area under the curve must be 1. We integrate f(x)f(x) over its defined range and set the result to 1.

02k(4x2)dx=1\int_{0}^{2} k(4-x^2) dx = 1

k[4xx33]02=1k \left[ 4x - \frac{x^3}{3} \right]_{0}^{2} = 1

k((4(2)233)(0))=1k \left( (4(2) - \frac{2^3}{3}) - (0) \right) = 1

k(883)=1k \left( 8 - \frac{8}{3} \right) = 1

k(2483)=1k \left( \frac{24-8}{3} \right) = 1

k(163)=1k \left( \frac{16}{3} \right) = 1

k=316k = \frac{3}{16} (as required)

(ii) To find P(X>1)P(X > 1), we integrate the PDF from 1 to the upper limit of the range, which is 2.

P(X>1)=12316(4x2)dxP(X > 1) = \int_{1}^{2} \frac{3}{16}(4-x^2) dx

=316[4xx33]12= \frac{3}{16} \left[ 4x - \frac{x^3}{3} \right]_{1}^{2}

=316[(4(2)233)(4(1)133)]= \frac{3}{16} \left[ (4(2) - \frac{2^3}{3}) - (4(1) - \frac{1^3}{3}) \right]

=316[(883)(413)]= \frac{3}{16} \left[ (8 - \frac{8}{3}) - (4 - \frac{1}{3}) \right]

=316[163113]= \frac{3}{16} \left[ \frac{16}{3} - \frac{11}{3} \right]

=316(53)= \frac{3}{16} \left( \frac{5}{3} \right)

=516= \frac{5}{16}

Worked example 2

For the random variable X with PDF f(x)=316(4x2)f(x) = \frac{3}{16}(4-x^2) for 0x20 \le x \le 2, find E(X)E(X) and Var(X)Var(X).

Show solution outline

First, find the expectation, E(X)E(X).

E(X)=02xf(x)dx=02x316(4x2)dxE(X) = \int_{0}^{2} x f(x) dx = \int_{0}^{2} x \cdot \frac{3}{16}(4-x^2) dx

=31602(4xx3)dx= \frac{3}{16} \int_{0}^{2} (4x - x^3) dx

=316[2x2x44]02= \frac{3}{16} \left[ 2x^2 - \frac{x^4}{4} \right]_{0}^{2}

=316[(2(22)244)(0)]= \frac{3}{16} \left[ (2(2^2) - \frac{2^4}{4}) - (0) \right]

=316[(8164)]=316(84)=316(4)=34= \frac{3}{16} \left[ (8 - \frac{16}{4}) \right] = \frac{3}{16} (8 - 4) = \frac{3}{16}(4) = \frac{3}{4}

So, E(X)=0.75E(X) = 0.75.

Next, find E(X2)E(X^2) to calculate the variance.

E(X2)=02x2f(x)dx=02x2316(4x2)dxE(X^2) = \int_{0}^{2} x^2 f(x) dx = \int_{0}^{2} x^2 \cdot \frac{3}{16}(4-x^2) dx

=31602(4x2x4)dx= \frac{3}{16} \int_{0}^{2} (4x^2 - x^4) dx

=316[4x33x55]02= \frac{3}{16} \left[ \frac{4x^3}{3} - \frac{x^5}{5} \right]_{0}^{2}

=316[(4(23)3255)(0)]= \frac{3}{16} \left[ (\frac{4(2^3)}{3} - \frac{2^5}{5}) - (0) \right]

=316[323325]=31632[1315]= \frac{3}{16} \left[ \frac{32}{3} - \frac{32}{5} \right] = \frac{3}{16} \cdot 32 \left[ \frac{1}{3} - \frac{1}{5} \right]

=2[5315]=2(215)=415= 2 \left[ \frac{5-3}{15} \right] = 2 \left( \frac{2}{15} \right) = \frac{4}{15}

Now, use the variance formula: Var(X)=E(X2)[E(X)]2Var(X) = E(X^2) - [E(X)]^2.

Var(X)=415(34)2=415916Var(X) = \frac{4}{15} - (\frac{3}{4})^2 = \frac{4}{15} - \frac{9}{16}

=64135240=71240= \frac{64 - 135}{240} = -\frac{71}{240}. Wait, variance cannot be negative! Let me recheck the calculation for E(X2)E(X^2).

Ah, E(X2)=316[323325]=316[1609615]=316[6415]=3×415=1215=45E(X^2) = \frac{3}{16} [\frac{32}{3} - \frac{32}{5}] = \frac{3}{16} [\frac{160-96}{15}] = \frac{3}{16} [\frac{64}{15}] = \frac{3 \times 4}{15} = \frac{12}{15} = \frac{4}{5}.

Let's try the variance calculation again with the corrected E(X2)E(X^2).

Var(X)=E(X2)[E(X)]2=45(34)2Var(X) = E(X^2) - [E(X)]^2 = \frac{4}{5} - (\frac{3}{4})^2

=45916=644580=1980= \frac{4}{5} - \frac{9}{16} = \frac{64 - 45}{80} = \frac{19}{80}

So, Var(X)=0.2375Var(X) = 0.2375. This is positive, which is a good sign.