DP IB Maths: AA HL

Revision Notes

4.7.1 Probability Density Function

Test Yourself

Calculating Probabilities using PDF

A continuous random variable can take any value in an interval so is typically used when continuous quantities are involved (time, distance, weight, etc)

What is a probability density function (p.d.f.)?

  • For a continuous random variable, a function can be used to model probabilities
    • This function is called a probability density function (p.d.f.), denoted by f(x)
  • For f(x) to represent a p.d.f. the following conditions must apply
    • f(x) ≥ 0 for all values of x
    • The area under the graph of y = f(x) must total 1
  • In most problems, the domain of x is restricted to an interval, a ≤ X ≤ b say, with all values of x outside of the interval having f(x)=0

How do I find probabilities using a probability density function (p.d.f.)?

  • The probability that the continuous random variable X lies in the interval a ≤ X ≤ b, where X has the probability density function f(x), is given by

space straight P left parenthesis a less or equal than X less or equal than b right parenthesis equals integral subscript a superscript b f left parenthesis x right parenthesis space straight d x

    • P(a ≤ X ≤ b) = P(a < X < b)
      • For any continuous random variable (including the normal distribution) P(X = n) = 0
      • One way to think of this is that a = b in the integral above
  • For linear functions it can be easier to find the probability using the area of geometric shapes
    • Rectangles: A = bh
    • Triangles: A = ½(bh)
    • Trapezoids: A = ½(a+b)h

How do I determine whether a function is a pdf?

  • Some questions may ask for justification of the use of a given function for a probability density function
    • In such cases check that the function meets the two conditions
      • f(x) ≥ 0 for all values of x
      • total area under the graph is 1

How do I use a pdf to find probabilities?

STEP 1
Identify the probability density function, f(x) - this may be given as a graph, an equation or as a piecewise function
e.g.  space f left parenthesis x right parenthesis equals open curly brackets table row cell 0.02 x end cell cell 0 less or equal than x less or equal than 10 end cell row 0 otherwise end table close
Identify the limits of X for a particular problem
Remember that P(a ≤ X ≤ b) = P(a < X < b)

STEP 2
Sketch, or use your GDC to draw, the graph of y = f(x)
Look for basic shapes (rectangles, triangles and trapezoids) as finding these areas is easier without using integration
Look for symmetry in the graph that may make the problem easier
Break the area required into two or more parts if it makes the problem easier

STEP 3
Find the area(s) required using basic shapes or integration and answer the question

  • Trickier problems may involve finding a limit of the integral given its value
    • i.e. Find one of the boundaries in the domain of X, given the probability
      • e.g. Find the value of a given that P(0 ≤ X ≤ a) = 0.09

Worked example

The continuous random variable, X, has probability density function.

 f(x)={0.08x0x50otherwise{"language":"en","fontFamily":"Times New Roman","fontSize":"18"}

a)
Show that f(x) can represent a probability density function.

4-7-1-ib-hl-aa-only-we1a-soltn-

b)
Find, both geometrically and using integration, P(0 ≤ X ≤ 2).
4-7-1-ib-hl-aa-only-we1b-soltn-
c)
Write down P(X = 3.2).
4-7-1-ib-hl-aa-only-we1c-soltn-

Median & Mode of a CRV

What is meant by the median of a continuous random variable?

  • The median, m, of a continuous random variable, X, with probability density function f(x) is defined as the value of X such that

space straight P stretchy left parenthesis X less than m stretchy right parenthesis equals straight P stretchy left parenthesis X greater than m stretchy right parenthesis equals 0.5

  • Since P(X = m) = 0 this can also be written as space straight P stretchy left parenthesis X less or equal than m stretchy right parenthesis equals straight P stretchy left parenthesis X greater or equal than m stretchy right parenthesis equals 0.5
  • If the p.d.f. is symmetrical (i.e. if the graph of y = f(x) is symmetrical) then the median will be equal to the x-coordinate of the line of symmetry
    • In such cases the graph of y = f(x) has an axis of symmetry in the line x = m

How do I find the median of a continuous random variable?

  • The median, m, of a continuous random variable, X, with probability density function f(x) is defined as the value of X such that

or

  • The equation that should be used will depend on the information in the question
    • If the graph of y = f(x) is symmetrical, symmetry may be used to deduce the median
    • This may often be the case if f(x) is linear and the area under the graph is a basic shape such as a rectangle

How do I find the median of a continuous random variable with a piecewise p.d.f.?

  • For piecewise functions, the location of the median will determine which equation to use in order to find it
    • For example
      • if space f stretchy left parenthesis x stretchy right parenthesis equals stretchy left curly bracket table row cell 1 fifth x end cell cell 0 less or equal than x less or equal than 2 end cell row cell 2 over 15 open parentheses 5 minus x close parentheses end cell cell 2 less or equal than x less or equal than 5 end cell row 0 otherwise end table
      • then integral subscript 0 superscript 2 1 fifth x space straight d x equals 0.4 so the median must lie in the interval 2 ≤ ≤ 5
      • so to find the median, m, solve space integral subscript 2 superscript m 2 over 15 left parenthesis 5 minus x right parenthesis space straight d x equals 0.1
        ('0.4 of the area' already used for 0 ≤ x ≤ 2)
      • Use a GDC to plot the function and evalutae integral(s)

What is meant by the mode of a continuous random variable?

  • The mode of a continuous random variable, X, with probability density function f(x) is the value of x that produces the greatest value of f(x)

How do I find the mode of a continuous random variable?

  • This will depend on the type of function f(x); the easiest way to find the mode is by considering the shape of the graph of y = f(x)
  • If the graph is a curve with a maximum point, the mode can be found by differentiating and solving f’(x) = 0
    • If there is more than one solution to f’(x) = 0 then further work may be needed in deducing the mode
      • There could be more than one mode
      • Look for valid values of x from the domain of the p.d.f.
      • Use the second derivative (f’’(x)) to deduce the nature of each stationary point
      • Check the values of f(x) at the lower and upper limits of x, one of these could be the maximum value f(x) reaches

Worked example

The continuous random variable X has probability function f(x) defined as

size 16px space size 16px f begin mathsize 16px style stretchy left parenthesis x stretchy right parenthesis end style size 16px equals size 16px 1 over size 16px 64 begin mathsize 16px style stretchy left parenthesis 16 x minus x cubed stretchy right parenthesis end style  size 16px space size 16px 0 size 16px less or equal than size 16px x size 16px less or equal than size 16px 4

a)
Find the median of X, giving your answer to three significant figures.

4-7-1-ib-hl-aa-only-we2a-soltn

b)
Find the exact value of the mode of X.

4-7-1-ib-hl-aa-only-we2b-soltn

Mean & Variance of a CRV

What are the mean and variance of a continuous random variable?

  • E(X) is the expected value, or mean, of the continuous random variable X
    • E(X) can also be denoted by μ
  • Var(X) is the variance of the continuous random variable X
    • Var(X) can also be denoted by σ2
    • The standard deviation, σ, is the square root of the variance

How do I find the mean and variance of a continuous random variable?

  • The mean is given by

mu equals straight E left parenthesis X right parenthesis equals integral subscript negative infinity end subscript superscript infinity x f left parenthesis x right parenthesis space straight d x

    • This is given in the formula booklet
    • If the graph of y = f(x) has axis of symmetry, x = a, then E(X) = a
  • The variance is given by

space sigma squared equals Var stretchy left parenthesis X stretchy right parenthesis equals straight E stretchy left parenthesis X squared stretchy right parenthesis minus stretchy left square bracket straight E open parentheses X close parentheses stretchy right square bracket squared

where space straight E left parenthesis X squared right parenthesis equals integral subscript negative infinity end subscript superscript infinity x squared f left parenthesis x right parenthesis space straight d x
    • This is given in the formula booklet
    • Another version of the variance is given in the formula booklet

space Var left parenthesis x right parenthesis equals integral subscript negative infinity end subscript superscript infinity left parenthesis x minus mu right parenthesis squared space f left parenthesis x right parenthesis space straight d x equals integral subscript negative infinity end subscript superscript infinity x squared f left parenthesis x right parenthesis space straight d x minus mu squared

    • but the first version above is usually more practical for solving problems
  • Be careful about confusing E(X2) and [E(X)]2
    • space straight E left parenthesis X squared right parenthesis equals integral subscript negative infinity end subscript superscript infinity x squared f left parenthesis x right parenthesis space straight d x   "mean of the squares"
    • space open square brackets straight E left parenthesis X right parenthesis close square brackets squared equals open square brackets integral subscript negative infinity end subscript superscript infinity x f left parenthesis x right parenthesis space straight d x close square brackets squared              "square of the mean"

How do I find the mean and variance of a linear transformation of a continuous random variable?

  • For the continuous random variable, X, with mean E(X) and variance Var(X) then

space straight E left parenthesis a X plus b right parenthesis equals a straight E left parenthesis X right parenthesis plus b

and

space Var left parenthesis a X plus b right parenthesis equals a squared Var left parenthesis X right parenthesis

Exam Tip

  • Using your GDC to draw the graph of y = f(x) can highlight any symmetrical properties which reduce the work involved in finding the mean and variance

Worked example

A continuous random variable, X, is modelled by the probability distribution function, f(x), such that

a)
Find the mean of X.

4-7-1-ib-hl-aa-only-we3a-soltn

b)
Find standard deviation of X.

4-7-1-ib-hl-aa-only-we3b-soltn

You've read 0 of your 0 free revision notes

Get unlimited access

to absolutely everything:

  • Downloadable PDFs
  • Unlimited Revision Notes
  • Topic Questions
  • Past Papers
  • Model Answers
  • Videos (Maths and Science)

Join the 100,000+ Students that ❤️ Save My Exams

the (exam) results speak for themselves:

Did this page help you?

Paul

Author: Paul

Paul has taught mathematics for 20 years and has been an examiner for Edexcel for over a decade. GCSE, A level, pure, mechanics, statistics, discrete – if it’s in a Maths exam, Paul will know about it. Paul is a passionate fan of clear and colourful notes with fascinating diagrams – one of the many reasons he is excited to be a member of the SME team.