Probability Density Function (CIE A Level Maths: Probability & Statistics 2)

Revision Note

Paul

Author

Paul

Last updated

Did this video help you?

Calculating Probabilities using PDF

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

  • For a continuous random variable , it is often possible to model probabilities using a function
    • This function is called a probability density function (p.d.f.)
    • For the continuous random variable,X , it would usually be denoted as a function of x  (such as f(x)  or g(x) )
  • The distribution (or density) of probabilities can be illustrated by the graph of f(x)
  • The graph does not need to start and end on the x-axis

2-3-1-cie-fig1-pdf-graph

  • For f(x) to represent a p.d.f. the following conditions must apply 
    • straight f left parenthesis x right parenthesis greater or equal than 0 for all values of x
      • This is the equivalent to P left parenthesis X equals x right parenthesis greater or equal than 0  for a discrete random variable
    • The area under the graph must total 1

integral subscript negative infinity end subscript superscript infinity straight f left parenthesis x right parenthesis space dx equals 1

      • This is equivalent to straight capital sigma begin mathsize 16px style straight P left parenthesis X equals x right parenthesis equals 1 end style for a discrete random variable

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 less or equal than X less or equal than b, where X has the probability density function f(x) , is given by

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

  • As with the normal distribution P left parenthesis a less or equal than X less or equal than b right parenthesis equals P left parenthesis a less than X less than b right parenthesis
      • for any continuous random variable, straight P left parenthesis X equals n right parenthesis space equals space 0  for all values of n
      • One way to think of this is that a equals b in the integral above

How do I solve problems using the 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 straight f left parenthesis straight x right parenthesis greater or equal than 0 for all values of x and the total area under the graph is 1
  • If asked to find a probability
    • 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.  straight f left parenthesis straight x right parenthesis equals open curly brackets table row cell 0.02 x space space space space 0 less or equal than x less or equal than 10 end cell row cell 0 space space space space space space space space space space space otherwise end cell end table close      

  • STEP 2
    Identify the range of X 
    for a particular problem

                            Remember that straight P left parenthesis a less or equal than X less or equal than b right parenthesis equals straight P left parenthesis a less than X less than b right parenthesis

                            Question: Can you explain why this is so?
                            (Answer is at end of this section)

  • STEP 3
    Sketching the graph of y = f(x) if simple may help to find the probability
    • Look for basic shapes such as triangles or rectangles; finding areas of these is easy and avoids integration
    • Look for symmetry in the graph that may make the problem easier
    • Integrate f(x) and evaluate it between the two limits for the required probability
  • Trickier problems may involve finding a limit of the integral given its value
    • i.e. one of the values in the range of X, given the probability
      e.g.        Find the value of a given straight P left parenthesis 0 less or equal than X less or equal than a right parenthesis equals 0.09
  • Answer to question in STEP 2:
    Since straight P left parenthesis X equals a right parenthesis equals straight P left parenthesis X equals b right parenthesis equals 0 comma space straight P left parenthesis a less or equal than X less or equal than b right parenthesis equals straight P left parenthesis a less than X less than b right parenthesis

Worked example

The continuous random variable, X, has probability density function

straight f left parenthesis x right parenthesis equals open curly brackets table row cell 0.08 x end cell cell 0 less or equal than x less or equal than 5 end cell row 0 otherwise end table close

(a)
Show that straight f left parenthesis x right parenthesis can represent a probability density function
 
(b)
Find
(i)
straight P left parenthesis 0 less or equal than X less or equal than 2 right parenthesis
(ii)
straight P left parenthesis X equals 3.2 right parenthesis
(iii)
straight P left parenthesis X greater than 4 right parenthesis
(a)
Show that straight f left parenthesis x right parenthesis can represent a probability density function

VnwVIRDH_2-3-1-cie-fig2-we-solution_a

(b)
Find
(i)
straight P left parenthesis 0 less or equal than X less or equal than 2 right parenthesis
(ii)
straight P left parenthesis X equals 3.2 right parenthesis
(iii)
straight P left parenthesis X greater than 4 right parenthesis
UmPMBtAP_2-3-1-cie-fig2-we-solution_b

Examiner Tip

  • If the graph is easy to draw, then a sketch of f(x) is helpful
    • This can highlight useful features such as the graph (and so probabilities) being symmetrical
    • Some p.d.f. graphs lead to common shapes such as triangles or rectangles whose areas are easy to find, avoiding the need for integration

Did this video help you?

Median and 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 the continuous random variable X, such that

begin mathsize 16px style bold P bold left parenthesis bold X bold less than bold m bold right parenthesis bold equals bold P bold left parenthesis bold X bold greater than bold m bold right parenthesis bold equals bold 0 bold. bold 5 end style

  •  Since begin mathsize 16px style straight P left parenthesis X equals m right parenthesis equals 0 end style this can also be written as begin mathsize 16px style P left parenthesis X less or equal than m right parenthesis equals P left parenthesis X greater or equal than m right parenthesis equals 0.5 end style
  • If the p.d.f. is symmetrical (i.e. the graph of y = f(x) is symmetrical) then the median will be halfway between the lower and upper limits of x
    • In such cases the graph of y=f(x) has axis of symmetry in the line x = m

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

  • By solving one of the equations to find m

 integral subscript negative infinity end subscript superscript m straight f left parenthesis x right parenthesis space dx space equals space 0.5

                                and

 integral subscript m superscript infinity straight f left parenthesis straight x right parenthesis space dx equals 0.5

  • The equation that should be used will depend on the information in the question
  • If the graph of begin mathsize 16px style y equals straight f left parenthesis x right parenthesis end style is symmetrical, symmetry may be used to deduce the median

How do I find quartiles (or percentiles) of a continuous random variable?

  • In a similar way, to find the median
    • The lower quartile will be the value L such that P(XL) = 0.25 or
      P(XL) = 0.75
    • The upper quartile will be the value U such that P(XU) = 0.75 or
      P(XU) = 0.25
  • Percentiles can be found in the same way
    • The 15th percentile will be the value k such that P(Xk) = 0.15 or
      P(Xk) = 0.85

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 PDF?

  • 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 f(x)
  • If the graph is a curve with a (local) maximum point, the mode can be found by differentiating and solving the equation f'(x) = 0
    • If there is more than one solution to f'(x) =  0 , further work may be needed to deduce which answer is the mode
      • Look for valid values of from the definition of the p.d.f.
      • Use the second derivative (f'' (x) ) to deduce the nature of each stationary point
      • You may need to check the values of f(x) at the endpoints too

Worked example

The continuous random variable X  has probability density function straight f left parenthesis x right parenthesis defined as

 straight f left parenthesis x right parenthesis equals 1 over 64 x open parentheses 16 minus x squared close parentheses space space space space space space space space space space space space space space space space space space space space space space 0 less or equal than x less or equal than 4             

 

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

 

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

(a)
Find the median of X, giving your answer to three significant figures
2-3-1-cie-fig3-we-solution_a
(b)
Find the exact value of the mode of X
2-3-1-cie-fig3-we-solution_b

Examiner Tip

  • Avoid spending too long sketching the graph of  y = f(x), only do this if the graph is straightforward as finding the median and mode by other means can be just as quick

You've read 0 of your 5 free revision notes this week

Sign up now. It’s free!

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

the (exam) results speak for themselves:

Did this page help you?

Paul

Author: Paul

Expertise: Maths

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.