Jump to content

2.06 - Sample Problem

From UBC Wiki

The length of time X, needed by students in a particular course to complete a 1 hour exam is a random variable with PDF given by

f(x)={k(x2+x)if 0x1,0elsewhere

For the random variable X,

  1. Find the value k that makes f(x) a probability density function (PDF)
  2. Find the cumulative distribution function (CDF)
  3. Graph the PDF and the CDF
  4. Find the probability that that a randomly selected student will finish the exam in less than half an hour
  5. Find the mean time needed to complete a 1 hour exam
  6. Find the variance and standard deviation of X

Solution

Part 1

The given PDF must integrate to 1. Thus, we calculate

1=f(x)dx=k01(x2+x)dx=k(x33+x22)|01=k(56)

Therefore, k = 6/5. Notice also that the PDF is nonnegative everywhere.

Part 2

The CDF, F(x), is the area function of the PDF, obtained by integrating the PDF from negative infinity to an arbitrary value x.

If x is in the interval (-∞, 0), then

F(x)=xf(t)dt=x0dt=0

If x is in the interval [0, 1], then

F(x)=xf(t)dt=0f(t)dt+0xf(t)dt=0+65(x33+x22)=65(x33+x22)

If x is in the interval (1, ∞) then

F(x)=xf(t)dt=0f(t)dt+01f(t)dt+1xf(t)dt=0+65(x33+x22)|01+0=6556=1

The CDF is therefore given by

F(x)={0if x<0,65(x33+x22)if 0x1,1if x>1.

Part 3

The PDF and CDF of X are shown below.

Part 4

The probability that a student will complete the exam in less than half an hour is Pr(X < 0.5). Note that since Pr(X = 0.5) = 0 (since X is a continuous random variable) it is equivalent to calculate Pr(x ≤ 0.5). This is precisely F(0.5):

F(0.5)=65(0.533+0.522)=65(124+18)=6516=15

Part 5

The mean time to complete a 1 hour exam is the expected value of the random variable X. Consequently, we calculate

𝔼(X)=xf(x)dx=6501x(x2+x)dx=6501x3+x2dx=65(x44+x33)|01=65(14+13)=710

Part 6

To find the variance of X, we use our alternate formula to calculate

Var(X)=𝔼(X2)[𝔼(X)]2=x2f(x)dx(710)2=6501x2(x2+x)dx49100=6501x4+x3dx49100=65(x55+x44)|0149100=65(15+14)49100=5410049100=120

Finally, we see that the standard deviation of X is

σ(X)=120=125