3Relative 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:
4Relative 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.
5Relative frequency histograms The distribution of the ages can be modelled by a curve.This curve is called a probability density function.
7Probability 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.
8Probability 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.
9Probability 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.
10Probability 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.
11Probability 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.
12Probability density functions 1.The function is non-negative everywhere.If f represents a p.d.f., thenSo f(x) could represent a probability density function.
13Probability density functions 2.The function is non-negative everywhere.For f to represent a p.d.f. we need to check thatBut:So f(x) could not represent a probability density function.
14Probability density functions 3.The function is clearly negative for some values of x.Consequently f(x) cannot represent a probability density function.
15Probability 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.
16Question 1Question 1: A continuous random variable X is defined by the probability density functionSketch the probability density function.Find the value of the constant k.Find P(1 ≤ X ≤ 3).
17Question 1 a) The diagram shows the probability density function. b) To find k, we can use the property thatIn (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
19Examination-style question 1 Examination-style question 1: A continuous random variable X is defined by the probability density functionSketch the probability density function.Find the value of the constant k.Find P(X > 2).
21Examination-style question 1 b) To find k, we can use the property thatNote that (5 – x)(x – 2) = 7x – 10 – x2So,Therefore
22Examination-style question 1 c) P(X > 2) =An alternative method would be to utilise P(X > 2) = 1 – P(X ≤ 2)
23Examination-style question 2 Examination-style question 2: The life, T hours, of an electrical component is modelled by the probability density functiona) 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.
28ModeSuppose 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.Differentiationcould be usedto find the mode here.
29Mode Example: A random variable X has p.d.f. f(x), where Find the mode.Sketch of f(x):
30Mode The mode can be found using differentiation: To find a turning point, we solveFactorize:Check that gives the maximum value:So the mode is
32Cumulative distribution functions The cumulative distribution function (c.d.f.) F(x) for a continuous random variable X is defined asF(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), whereFind the c.d.f. and find P(X < 1).
33Cumulative 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.
34Cumulative distribution functions So the c.d.f. isP(X < 1) = F(1) =
36Median and quartilesThe median, m, of a random variable X is defined to be the value such thatF(m) = P(X ≤ m) = 0.5where F is the cumulative distribution function of X.Likewise the lower quartile is the solution to the equationF(x) = 0.25and the upper quartile is the solution toF(x) = 0.75.
37Median and quartilesMove the slider to the left and right to identify the median and quartile values for the distribution.
38Median and quartilesExample: 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).
39Median and quartilesa) We can get the p.d.f. by differentiating the c.d.f.So the p.d.f. isSketch of f(x):
40Median 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]).
41Median and quartilesc) P(3 ≤ X ≤ 4) = F(4) – F(3)
42Median and quartilesExample: A random variable X has p.d.f. f(x), whereotherwiseCalculate the cumulative distribution function and verify that the lower quartile is at x = 2.Work out the median value of X.
43Median 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
44Median 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.
45Median and quartilesb) 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.37As 5.63 does not lie in the interval [2, 4], the median must be 2.37.
47ExpectationIf 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 byE[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:
48ExpectationExample: A random variable X is defined by the probability density functionCalculate the value of E[X] and E[1/X].
51VarianceIf 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 byorThe standard deviation of X is the square root of the variance.The standard deviation is sometimes denoted by the symbol σ.
52VarianceExample: A continuous random variable Y has a probability density function f(y) whereCalculate the value of Var[Y].Sketch of f(y):The p.d.f. is symmetrical. Therefore E[Y] = 2.
57Examination-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 functionSketch 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.