1.25 Continuous Probability

A Picture-Book Overview: Continuous Probability

An empirical CDF of height by sex, which is shown in color.

A CDF relates the probability \(<=\) a value to the value itself.

An empirical PDF of height by sex, which is shown in color.

A PDF relates the probability of a single value** to the value itself.

** Technically, the probability of any single value in a continuous variable is 0. But, we can think of a small neighborhood around each value instead.

Cumulative Distribution Functions

Probability Density Functions

PDFs: Like histograms shrinking binwidth to (very close to) 0… but the math is complicated.

A gif showing the basic plot of a normal PDF (line) with a histogram drawn from normal samples underneath. As time increases, the binwidth shrinks until it is hard to see single bins any longer. As this happens, the tops of the bins become a relatively good approximation for the normal PDF curve.

Theoretical Distributions

  • are useful approximations to the behavior of natural things
    and work very well for biological situations with many factors, like height, which is controlled by many different genes + environmental influences
  • were easier to use than samples before computing power \(\Rightarrow\) historically important
  • always result in the same answer (unlike random samples)

Continuous Distributions

  • \(P(x = a) = 0\) if \(x\) is continuously distributed

  • \(P(a <= x < b)\) is what we work with

    • area under PDF between \(a\) and \(b\)

Continuous Distributions in R

Command What it does
rnorm(n, mean = 0, sd = 1) \(n\) random numbers
dnorm(x, mean = 0, sd = 1) normal density at \(x\)
pnorm(q, mean = 0, sd = 1) \(P(x \leq q)\) (CDF value)
qnorm(p, mean = 0, sd = 1) \(P(x \leq q) = p\) (solves for \(q\))
This is the quantile function

Other distribution types exist: Exponential, Gamma, Beta, t, F…

They all follow the rXXX, dXXX, pXXX, qXXX pattern (but have different parameters)