Mastering Mathematics Smartly
by Wee Wen Shih

A unique self-help website that provides comprehensive coverage of mathematics at A-level & beyond, written in a student-friendly style.

Confidence intervals

In H2 mathematics, we have seen that the sample mean \overline{x} is an unbiased estimate of the population mean \mu.

Instead of a single value, we might want to identify a range of possible values, which we call a confidence interval. A symmetric \alpha\% confidence interval for the population mean will give us a range of values of \mu with a probability of \frac{\alpha}{100}.

Let's look at an example. An athlete is training for the javalin event. He records the distances, x metres, that he throws on 50 attempts and it was found that \Sigma (x-40) = 1281 and \Sigma (x-40)^2 = 32935. Find the symmetric 96% confidence interval for the mean distance thrown.

We follow the steps below.

Step 1: Find unbiased estimates of the mean and the variance for the population.

This is standard H2 work, from which we obtain \overline x = 65.62 and s = \sqrt{\frac{827}{350}}.

Step 2: Find the confidence interval by means of the result \overline x \pm z.\frac{s}{\sqrt{n}}, where z = \text{invNorm}\left(\frac{1 - \frac{\alpha}{100}}{2}\right).

We obtain 65.62 \pm (-2.05375)\frac{ \sqrt{\frac{827}{350}}} {\sqrt{50}}, where z = invNorm(0.02) from the TI graphic calculator.

The confidence interval is thus given by (65.17, 66.07), correct to 2 decimal places.

Probability distributions

In H2 mathematics, we encountered the normal distribution as a continuous distribution.

The normal distribution is defined as the distribution with the density f(x) = \frac{1}{\sigma \sqrt{2\pi}} e^{-\frac{1}{2}\left(\frac{x - \mu}{\sigma}\right)^2}, \sigma > 0.

The area under the curve of f(x) gives us the probability and we typically make use of the graphic calculator to find it, instead of carrying out the tedious integration process of \int_{a}^{b} f(v)\:dv (tedious because the expression of f is complicated) to find P(a < X \leq b).

For the normal distribution, we also know that P\left(-\infty < X < \infty\right) = 1
.

What if we change the density f of the distribution? This will lead us to define any continuous distribution the way we want it to behave (other than the familiar bell-shaped characteristic). To find the probability of this new continuous distribution, we carry out integration just like the case of the normal distribution.

Let's study an example. Suppose a continuous random variable X has the density function f(x) = \frac{3}{4}\left(1 - x^2\right) if -1 \leq x \leq 1 and zero otherwise. Find the probabilities P\left(-\frac{1}{2} \leq X \leq \frac{1}{2}\right) and P\left(\frac{1}{4} \leq X \leq 2\right).

First, we note that \int_{-1}^{1} f(v)\:dv = 1 (verify this as a form of practice).

We work out the first probability by integration:
\\P\left(\frac{1}{2} \leq X \leq \frac{1}{2}\right)
\\= \frac{3}{4}\int_{-\frac{1}{2}}^{\frac{1}{2}} \left(1 - v^2\right)\:dv
\\= \frac{3}{4}\left[v - \frac{v^3}{3}\right]_{-\frac{1}{2}}^{\frac{1}{2}}
\\= \frac{11}{16}

We obtain the second probability by the same approach:
\\P\left(\frac{1}{4} \leq X \leq 2\right)
\\= \frac{3}{4}\int_{\frac{1}{4}}^{1} \left(1 - v^2\right)\:dv
\\= \frac{3}{4}\left[v - \frac{v^3}{3}\right]_{\frac{1}{4}}^{1}
\\= \frac{81}{256}

It is crucial for us to notice that the upper limit of integration is 1, not 2, because f is defined for the range between -1 and 1 inclusive only.

How do we find \mu and \sigma^2 of any continuous random variable X? By definition, \mu = \int_{-\infty}^{\infty} xf(x)\:dx and \sigma^2 = \int_{-\infty}^{\infty} \left(x - \mu\right)^2f(x)\:dx.

Let's apply the definitions for our example:
\\\mu = \int_{-1}^{1} x\left[\frac{3}{4}\left(1 - x^2\right)\right]\:dx
\\= 0

\\\sigma^2 = \int_{-1}^{1} \left(x - 0\right)^2\left[\frac{3}{4}\left(1 - x^2\right)\right]\:dx
\\= \frac{1}{5}

Practice: Suppose a continuous random variable X has probability density function given by

where a and b are constants. Given that P(0<X<1) = \frac{5}{12}, find \mu and \sigma^2 of X.