Basic Probability (Part 3)

Rebekah Robinson, Georgetown College

In Part 3:

Load Packages

Always remember to make sure the necessary packages are loaded:

require(mosaic)
require(tigerstats)

Continuous Random Variables

Continuous Random Variable

A continuous random variable is a random variable whose possible values lie in a range of real numbers.

Examples:
\( X=\mbox{amount of sugar in an orange.} \)

  • Range of \( X \) = \( (0,\infty) \).

\( Y=\mbox{heights of students at GC} \)

  • Range of \( Y=(0,\infty) \).

\( Z=\mbox{student grades in MAT 111} (\%) \)

  • Range of \( Z=[0,100] \)

PDF of Continuous Random Variable

The PDF for a discrete random variable is a table or a histogram.

The PDF for a continuous random variable is a smooth curve.

Normal Random Variable

PDF for a normal random variable \( X \):

  • Normal curve

  • Bell-shaped

  • Symmetric about \( EV(X)=\mu \)

  • \( SD(X)=\sigma \)

  • 68-95 Rule applies

plot of chunk unnamed-chunk-4

68-95 Rule

  • Probability that \( X \) falls within 1 standard deviation of the mean:

\[ P(\mu-\sigma< X < \mu+\sigma)\approx 0.68 \]

  • Probability that \( X \) falls within 2 standard deviations of the mean:

\[ P(\mu-2\sigma< X < \mu+2\sigma)\approx 0.95 \]

  • Probability that \( X \) falls within 3 standard deviations of the mean:

\[ P(\mu-3\sigma< X < \mu+3\sigma)\approx 0.997 \]

Normal Random Variable: An Example

Example: The heights of college males follow a normal distribution with \( \mu=72 \) inches and \( \sigma=3.1 \) inches. Let

\[ X= \mbox{ height of a college male.} \]

About 95% of college males are between what two heights?

\( P( \) ________ < \( X \) < ________\( ) \) \( \approx \) 0.95

require(manipulate)
EmpRuleGC(mean=72,sd=3.1)

Normal Probabilities (Greater Than)

Calculating other probabilities for \( X \) is easy.

To find \( P(X>70.9) \):

pnormGC(70.9,region="above",mean=72,
         sd=3.1,graph=TRUE)

Normal Probabilities (Greater Than)

plot of chunk unnamed-chunk-7

[1] 0.6386

\[ P(X>70.9)=0.6386 \]

Normal Probabilities (Outside)

To find \( P(X<69.4 \mbox{ or } X>79.1) \):

pnormGC(c(69.4,79.1),region="outside",
        mean=72,sd=3.1,graph=TRUE)

Normal Probabilities (Outside)

plot of chunk unnamed-chunk-9

[1] 0.2118

\[ P(X<69.4 \mbox{ or } X>79.1) \] \[ =0.2118 \]

Percentile Ranking

Suppose we want to know the height of a male that is taller than 80% of college men.

\[ P(X\leq x)=0.80 \]

To find the percentile ranking, \( x \)

qnorm(0.80,mean=72,sd=3.1)
[1] 74.61

A 74.61 inch tall male is taller than 80% of college men.

Approximating Binomial Random Variables

Binomial Approximation

A normal distribution is a good approximation to a binomial distribution if:

  • there are at least 10 expected successes, \( np\geq 10 \) and

  • there are at least 10 expected failures, \( n(1-p)\geq 10 \).

require(manipulate)
BinomNorm()

Binomial Approximation

If the expected number of success or failures is too small, this approximation is not very good.

require(manipulate)
BinomSkew()