Jump to content

Science:MATH105 Probability/Lesson 2 CRV/2.12 Example

From UBC Wiki

Problem

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,0else

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. Use the CDF to find
    1. Pr(X ≤ 0)
    2. Pr(X ≤ 1)
    3. Pr(X ≤ 2)
  5. find the probability that that a randomly selected student will finish the exam in less than half an hour
  6. Find the mean time needed to complete a 1 hour exam
  7. 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.

Part 2

The CDF, F(x), is 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

Note that the PDF f is equal to zero for x > 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

These probabilities can be calculated using the CDF:

Pr(X0)=F(0)=65(033+022)=0Pr(X1)=F(1)=65(133+122)=6556=1Pr(X2)=1

Note that we could have evaluated these probabilities by using the PDF only, integrating the PDF over the desired event.

Part 5

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, we an equivalently calculate Pr(x ≤ 0.5). This is now precisely F(0.5):

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

Part 6

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 7

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

StdDev(X)=120=125