12 3meansd

# Measures of central tendency and spread

.

As with discrete probability distributions we can find measures of central tendency and spread for continuous probability distributions.

.

## Measures of central tendency

.

For any continuous random variable, X with a probability distribution function of $f(x)$
.

### Mean

… … The mean (or expected value) can be found by:
.

… … … $\mu=E(X) = \displaystyle{ \int\limits_{-\infty}^{\infty} \; x \,f(x) \; dx }$
.

… … {Compare this to the rule for the Expected Value of a discrete random variable}
.

### Median

… … The median, m, is the value of X such that:
.

… … … $Pr(X \leqslant m) = Pr(X \geqslant m) = 0.5$
.

… … … $\displaystyle{ \int\limits_{-\infty}^{m} \; f(x) \; dx} = 0.5$
.

### Mode

… … The mode, M, is the value of X such that:
.

… … … $f( M ) \geqslant f( x )$ … for all other values of x
.

… … … In other words, it is value of $x$ that gives the maximum point on the graph of $f(x)$

… … … … (either a stationary point or an endpoint)}

.

### Example 1

The continuous random variable X has a probability density function with the following rule:

… … $f(x)=\Bigg\{\begin{matrix} 1.5(1-x^2)&\quad 0 \leqslant {x} \leqslant 1 \quad .\\ 0 & \text{elsewhere} \\ \end {matrix}$

Find
a) .. The mean

b) .. The median

c) .. The mode

Solution

a) .. The mean
.

… … … $\mu = \displaystyle{ \int\limits_{-\infty}^{\infty} \; x \,f(x) \; dx }$
.

… … … $\mu = \displaystyle{ \int\limits_0^1 \; x \times 1.5 \big(1-x^2 \big) \; dx }$
.

… … … $\mu = \displaystyle{ \int\limits_0^1 \; \dfrac{3x}{2} - \dfrac{3x^3}{2} \; dx }$
.

… … … $\mu = \Bigg[ \dfrac{3x^2}{4} - \dfrac{3x^4}{8} \Bigg]_0^1$
.

… … … $\mu = \Big( \dfrac{3}{4} - \dfrac{3}{8} \Big) - \Big( 0 - 0 \Big)$
.

… … … $\mu = \dfrac{3}{8}$

.

b) .. The median
.
… … The median, m, is the value of X such that:
.

… … … $\displaystyle{ \int\limits_{-\infty}^{m} \; f(x) \; dx} = 0.5$
.

… … … $\displaystyle{ \int\limits_0^m \; \dfrac{3}{2}\big( 1-x^2 \big) \; dx } = 0.5$
.

.

… … … $\Bigg[ \dfrac{3}{2} \Big(x - \dfrac{x^3}{3} \Big) \Bigg]_0^m = 0.5$
.

… … … $\Bigg[ \dfrac{3x}{2} - \dfrac{x^3}{2} \Bigg]_0^m = 0.5$
.

… … … $\Big( \dfrac{3m}{2} - \dfrac{m^3}{2} \Big) - \Big( 0 - 0 \Big) = 0.5$
.

… … … $\dfrac{3m}{2} - \dfrac{m^3}{2} = 0.5$
.

… … … $3m - m^3 = 1$
.

… … … $m^3 - 3m + 1 = 0$
.

… … … $m = -1.879, \;or \; m = 0.347, \; or \; m = 1.532$
.

.

… … … but $m \in \big[0, \; 1\big]$

… … … Hence $median = 0.347$
.

c) .. The mode

… … … The mode is the value of $x$ that gives the maximum point on the graph of $f(x)$
.

… … … By observation of the graph, the maximum point occurs at $x = 0$ … endpoint

.

… … … Hence, $mode = 0$

.

.

### Interquartile Range (IQR)

.

… … The InterQuartile Range (IQR) is given by $IQR = Q_3 - Q_1$,

… … … where Q1 is $\frac{1}{4}$ of the way through the data

… … … and Q3 is $\frac{3}{4}$ of the way through the data
.

.. … To find each quartile, we find where the area under the curve is equal to 25% or 0.25

.

… … So . $Q_1 = a \; \text{ where } \; \displaystyle{ \int \limits_{-\infty}^a \; f(x) \; dx} = 0.25$
.

… … And . $Q_3 = b \; \text{ where } \; \displaystyle{ \int \limits_b^{\infty} \; f(x) \; dx} = 0.25$
.

… … Then . $IQR = b - a$

.

### Variance

… … The variance can be found by:
.

… … … $Var (X) = \sigma^2 = E\left[(X - \mu)^2\right]$
.

… … … $\sigma^2 = \displaystyle{ \int\limits_{-\infty}^{\infty} \; (x - \mu)^2f(x) \; dx}$
.

… … OR
.

… … … $Var (X) = \sigma^2 = E \Big( X^2 \Big) - \mu^2$
.

… … … $\sigma^2 = \displaystyle{ \int\limits_{-\infty}^{\infty} \; x^2f(x) \; dx} - {\mu}^2$
.

… … … {This is also comparable to the rule for Variance of a discrete random variable}

.

### Standard deviation

.

… … The standard deviation, is the same as always:

… … … $\sigma = \sqrt{Var (X)}$

.

### Example 2

.

The continuous random variable X has probability density function given by:

… … $f(x)=\Bigg\{ \begin{matrix} \dfrac{k}{x}&1\leqslant x \leqslant 9 \\ 0&\text{elsewhere} \end{matrix}$

a) .. Find the exact value of k.

b) .. Find the mean and standard deviation of X. correct to 3 decimal places
.

Solution:

a) .. Find the exact value of k.
.

… … … Since $f(x)$ is a probability density function we expect:
.

… … … $\displaystyle{ \int\limits_{-\infty}^{\infty} \; f(x) \; dx} =1$
.

… … … so
.

… … … $\displaystyle{ \int\limits_{1}^{9} \; \dfrac{k}{x} \; dx} =1$
.

… … … $\Big[ k \log_e(x) \Big]_1^9 = 1$
.

… … … $\Big( k\log_e(9) \Big) - \Big( k \log_e(1) \Big) = 1$
.

… … … $k\log_e(9)=1$
.

… … … $k=\dfrac{1}{\log_e(9)}$
.

… … … $k = \dfrac{1}{\log_e \big( 3^2 \big) }$
.

… … … $k = \dfrac{1}{2 \log_e(3)}$

.

b) .. Find the mean and standard deviation of X. correct to 3 decimal places
.

… … … $\mu = \displaystyle{ \int\limits_{1}^{9} \; xf(x)\; dx}$
.

… … … … $= \displaystyle{ \int\limits_{1}^{9} \; x\times\dfrac{1}{2\log_e(3)} \times \dfrac{1}{x} \; dx}$
.

… … … … $= \displaystyle{ \int\limits_{1}^{9} \; \dfrac{1}{2 \log_e(3)} \; dx}$
.

… … … … $= \left[\dfrac{x}{2 \log_e(3)}\right]_{1}^{9}$
.

… … … … $= \dfrac{9}{2 \log_e(3)}-\dfrac{1}{2 \log_e(3)}$
.

… … … … $= \dfrac{8}{2 \log_e(3)}$
.

…. … … … $= \dfrac{4}{\log_e(3)}$
.

… … … $\mu = 3.641$
.

… … … $Var (X) = \sigma^2 = E(X^2) - {\mu}^2$
.

… … … $\sigma^2 = \displaystyle{ \int\limits_{1}^{9} \; x^2f(x) \; dx} - {\mu}^2$
.

… … … … $= \displaystyle{ \int\limits_{1}^{9} \; x^2 \times \dfrac{1}{2\log_e(3)} \times \dfrac{1}{x} \; dx} - \left( \dfrac{4}{\log_e(3)} \right)^2$
.

… … … … $= \displaystyle{ \int\limits_{1}^{9} \; \dfrac{x}{2\log_e (3)} \; dx} - \left( \dfrac{4}{\log_e(3)} \right)^2$
.

… … … $\sigma^2 = 4.948$
.

… … … $\sigma = 2.224$

.