S2.2 Continuous random variables

Presentation on theme: "S2.2 Continuous random variables"— Presentation transcript:

S2.2 Continuous random variables
A2-Level Maths: Statistics 2 for Edexcel S2.2 Continuous random variables This icon indicates the slide contains activities created in Flash. These activities are not editable. For more detailed instructions, see the Getting Started presentation. 1 of 61 © Boardworks Ltd 2006

Relative frequency histograms
Probability density functions Mode Cumulative distribution functions Median and quartiles Expectation Variance Contents 2 of 61 © Boardworks Ltd 2006

Relative frequency histograms
A histogram has the important property that the area of each bar is in proportion to the corresponding frequency. A histogram with unequal widths can be drawn by plotting the frequency density on the vertical axis, where: A relative frequency histogram is one in which the area of a bar corresponds to the proportion of the data falling into the corresponding interval. The relative frequency is defined as:

Relative frequency histograms
Example: The relative frequency histogram below shows the distribution of ages of the UK population. Discuss with your class the shape of the distribution. The area of each bar corresponds to the proportion of the population with ages in that interval. The total area of all the bars is 1.

Relative frequency histograms
The distribution of the ages can be modelled by a curve. This curve is called a probability density function.

Probability density functions
Relative frequency histograms Probability density functions Mode Cumulative distribution functions Median and quartiles Expectation Variance Contents 6 of 61 © Boardworks Ltd 2006

Probability density functions
A probability density function (or p.d.f.) is a curve that models the shape of the distribution corresponding to a continuous random variable. A probability density function has several important properties.

Probability density functions
If f(x) is the p.d.f corresponding to a continuous random variable X and if f(x) is defined for a ≤ x ≤ b then the following properties must hold: 1. i.e. the total area under a p.d.f. is 1.

Probability density functions
If f(x) is the p.d.f. corresponding to a continuous random variable X and if f(x) is defined for a ≤ x ≤ b then the following properties must hold: 2. i.e. the graph of the p.d.f. never dips below the x-axis.

Probability density functions
If f(x) is the p.d.f. corresponding to a continuous random variable X and if f(x) is defined for a ≤ x ≤ b then the following properties must hold: 3. i.e. probabilities correspond to areas under the curve.

Probability density functions
Example: Sketch the graph of each of the following functions. Decide in each case whether it could be the equation of a probability density function: 1. 2. 3.

Probability density functions
1. The function is non-negative everywhere. If f represents a p.d.f., then So f(x) could represent a probability density function.

Probability density functions
2. The function is non-negative everywhere. For f to represent a p.d.f. we need to check that But: So f(x) could not represent a probability density function.

Probability density functions
3. The function is clearly negative for some values of x. Consequently f(x) cannot represent a probability density function.

Probability density functions
Move the sliders to the left and right to see how the probability changes with the values of a and b. You could also use the graph to identify the modal value of the distribution.

Question 1 Question 1: A continuous random variable X is defined by the probability density function Sketch the probability density function. Find the value of the constant k. Find P(1 ≤ X ≤ 3).

Question 1 a) The diagram shows the probability density function.
b) To find k, we can use the property that In (b), you could find the area underneath the probability density function by using the formula for the area of a triangle. Therefore, 12.5k = 1

Question 1 c) P(1 ≤ X ≤ 3) = 0.48

Examination-style question 1
Examination-style question 1: A continuous random variable X is defined by the probability density function Sketch the probability density function. Find the value of the constant k. Find P(X > 2).

Examination-style question 1

Examination-style question 1
b) To find k, we can use the property that Note that (5 – x)(x – 2) = 7x – 10 – x2 So, Therefore

Examination-style question 1
c) P(X > 2) = An alternative method would be to utilise P(X > 2) = 1 – P(X ≤ 2)

Examination-style question 2
Examination-style question 2: The life, T hours, of an electrical component is modelled by the probability density function a) Sketch the probability density function. b) Find the value of the constant k. c) Find P(1500 ≤ T ≤ 2000). This question could be omitted if the students have not been introduced to the integral of the exponential function.

Examination-style question 2
Solution: a)

Examination-style question 2
b) To find k, we use the fact that So: This question could be omitted if the students have not been introduced to the integral of the exponential function. Therefore

Examination-style question 2
c) P(1500 ≤ T ≤ 2000) = This question could be omitted if the students have not been introduced to the integral of the exponential function. = (3 s.f.)

Contents Mode Relative frequency histograms
Probability density functions Mode Cumulative distribution functions Median and quartiles Expectation Variance Contents 27 of 61 © Boardworks Ltd 2006

Mode Suppose that a random variable X is defined by the probability density function f(x) for a ≤ x ≤ b. The mode of X is the value of x that produces the largest value for f(x) in the interval a ≤ x ≤ b. A sketch of the probability density function can be very helpful when determining the mode. Differentiation could be used to find the mode here.

Mode Example: A random variable X has p.d.f. f(x), where
Find the mode. Sketch of f(x):

Mode The mode can be found using differentiation:
To find a turning point, we solve Factorize: Check that gives the maximum value: So the mode is

Cumulative distribution functions
Relative frequency histograms Probability density functions Mode Cumulative distribution functions Median and quartiles Expectation Variance Contents 31 of 61 © Boardworks Ltd 2006

Cumulative distribution functions
The cumulative distribution function (c.d.f.) F(x) for a continuous random variable X is defined as F(x) = P(X ≤ x). Therefore, the c.d.f. is found by integrating the p.d.f.. Example: A random variable X has p.d.f. f(x), where Find the c.d.f. and find P(X < 1).

Cumulative distribution functions
Solution: The c.d.f., F(x) is given by: To find the constant c we can use the fact that P(X ≤ 0) = 0 (because the random variable X is only non-zero between 0 and 2) Therefore F(0) = 0, i.e. c = 0.

Cumulative distribution functions
So the c.d.f. is P(X < 1) = F(1) =

Contents Median and quartiles Relative frequency histograms
Probability density functions Mode Cumulative distribution functions Median and quartiles Expectation Variance Contents 35 of 61 © Boardworks Ltd 2006

Median and quartiles The median, m, of a random variable X is defined to be the value such that F(m) = P(X ≤ m) = 0.5 where F is the cumulative distribution function of X. Likewise the lower quartile is the solution to the equation F(x) = 0.25 and the upper quartile is the solution to F(x) = 0.75.

Median and quartiles Move the slider to the left and right to identify the median and quartile values for the distribution.

Median and quartiles Example: A random variable X is defined by the cumulative distribution function: a) Calculate and sketch the probability density function. Find the median value. Work out P(3 ≤ X ≤ 4).

Median and quartiles a) We can get the p.d.f. by differentiating the c.d.f. So the p.d.f. is Sketch of f(x):

Median and quartiles The median, m, satisfies F(m) = 0.5. Therefore
The median must be 3.77 (as the p.d.f. is only non-zero for values in the interval [2, 5]).

Median and quartiles c) P(3 ≤ X ≤ 4) = F(4) – F(3)

Median and quartiles Example: A random variable X has p.d.f. f(x), where otherwise Calculate the cumulative distribution function and verify that the lower quartile is at x = 2. Work out the median value of X.

Median and quartiles a)
We know that P(X ≤ 1) = 0, i.e., that F(1) = 0. So, We know that P(X ≤ 4) = 1, i.e. that F(4) = 1. So

Median and quartiles So
To verify that the lower quartile is 2, we simply need to check that F(2) = 0.25: Therefore the lower quartile is 2.

Median and quartiles b) The median, m, must lie in the interval [2, 4] because F(2) = 0.25. To find the median we must solve F(m) = 0.5: This can be rearranged to give the quadratic equation: Using the quadratic formula, m = or m = 2.37 As 5.63 does not lie in the interval [2, 4], the median must be 2.37.

Contents Expectation Relative frequency histograms
Probability density functions Mode Cumulative distribution functions Median and quartiles Expectation Variance Contents 46 of 61 © Boardworks Ltd 2006

Expectation If X is a continuous random variable defined by the probability density function f(x) over the domain a ≤ x ≤ b, then the mean or expectation of X is given by E[X] is the value you would expect to get, on average. This mean value of X is also sometimes denoted μ. [Note: if the p.d.f. is symmetrical, then the expected value of X will be the value corresponding to the line of symmetry]. We can also find the expected value of g(X), i.e. any function of X:

Expectation Example: A random variable X is defined by the probability density function Calculate the value of E[X] and E[1/X].

Expectation So,

Contents Variance Relative frequency histograms
Probability density functions Mode Cumulative distribution functions Median and quartiles Expectation Variance Contents 50 of 61 © Boardworks Ltd 2006

Variance If X is a continuous random variable defined by the probability density function f(x) over the domain a ≤ x ≤ b, then the variance of X is given by or The standard deviation of X is the square root of the variance. The standard deviation is sometimes denoted by the symbol σ.

Variance Example: A continuous random variable Y has a probability density function f(y) where Calculate the value of Var[Y]. Sketch of f(y): The p.d.f. is symmetrical. Therefore E[Y] = 2.

Variance Therefore Var[Y] =

Variance Example: A continuous random variable x has a probability density function f(x) where Calculate the mean value, μ. the standard deviation, σ.

Variance a)

Variance b) Therefore σ = = 1.40 (3 s.f.)

Examination-style question
Examination-style question: The mass, X kg, of luggage taken on board an aircraft by a passenger can be modelled by the probability density function Sketch the probability density function and find the value of k. Verify that the median weight of luggage is about kg. Find the mean and the variance of X.

Examination-style question
To find k we use

Examination-style question
b) To verify that the median is about , we need to check that P(X ≤ ) = 0.5 P(X ≤ ) =

Examination-style question
c)

Examination-style question
c) Therefore,