prob-stats-lab describe · probability · distributions · sampling

1. Descriptive statistics & boxplot

Click on the strip to add data points (or randomise). The five-number summary, mean, variance and standard deviation update live. Mean $\bar x=\frac1n\sum x_i$; sample variance $s^2=\frac1{n-1}\sum (x_i-\bar x)^2$.

$n$
mean $\bar x$
median
$Q_1$ · $Q_3$ · IQR
variance $s^2$
std dev $s$

Click empty space to add a value; click near a dot to remove it.

2. Mean vs median — outlier sensitivity

Drag the outlier slider and watch the mean chase it while the median stays put. The mean is pulled by extreme values; the median is a resistant measure of centre.

mean
median
mean − median

3. Histogram, dotplot & skew

A sample drawn from a skewable population, binned into a histogram with overlaid mean and median. Skew shifts the mean toward the long tail. Adjust skew, sample size and bin count.

mean
median
shape

4. Conditional probability & independence

A unit square split by two events $A$ and $B$. Drag the partitions to set $P(A)$, $P(B\mid A)$ and $P(B\mid A^c)$. Read $P(A\cap B)$, $P(B)$ and $P(A\mid B)$ via Bayes; events are independent iff $P(B\mid A)=P(B\mid A^c)$.

$P(A\cap B)$
$P(B)$
$P(A\mid B)$
independent?

5. Counting — permutations vs combinations

Choosing $k$ from $n$: order-sensitive permutations $P(n,k)=\frac{n!}{(n-k)!}$ versus unordered combinations $C(n,k)=\binom{n}{k}=\frac{n!}{k!\,(n-k)!}$. The bars compare the two counts.

permutations $P(n,k)$
combinations $C(n,k)$
ratio $k!$

6. Binomial distribution

$X\sim\mathrm{Bin}(n,p)$ counts successes in $n$ independent Bernoulli trials. PMF $P(X=k)=\binom{n}{k}p^k(1-p)^{n-k}$, mean $np$, variance $np(1-p)$.

mean $np$
variance $np(1-p)$
std dev
most likely $k$

7. Poisson distribution

$X\sim\mathrm{Pois}(\lambda)$ models rare-event counts. PMF $P(X=k)=\dfrac{e^{-\lambda}\lambda^k}{k!}$, with mean $=$ variance $=\lambda$. As $n\to\infty$, $p\to0$ with $np=\lambda$, the binomial converges to this.

mean $\lambda$
variance $\lambda$
$P(X=0)$
most likely $k$

8. Normal distribution & the 68–95–99.7 rule

$X\sim N(\mu,\sigma^2)$ with density $f(x)=\frac{1}{\sigma\sqrt{2\pi}}e^{-(x-\mu)^2/2\sigma^2}$. Shade $[a,b]$ to read $P(a\le X\le b)$ and the $z$-scores. The empirical rule covers $\pm1,\pm2,\pm3\sigma$.

$z$-scores
$P(a\le X\le b)$

9. Continuous distributions — PDF & CDF

Uniform, exponential and normal densities side by side with their cumulative distribution $F(x)=P(X\le x)$. Move the cursor line to read the density and the cumulative probability at a point.

density $f(x)$
$F(x)=P(X\le x)$
mean · variance

10. Covariance, correlation & least squares

Drag points to reshape the cloud. The least-squares line $\hat y=a+bx$ minimises squared residuals; $r=\frac{\mathrm{Cov}(x,y)}{s_x s_y}$ measures linear association and $R^2=r^2$ the variance explained.

slope $b$
intercept $a$
covariance
correlation $r$
$R^2$

Drag any point; click empty space to add one.

11. Central Limit Theorem — sampling distribution of $\bar X$

Repeatedly draw samples of size $n$ from a non-normal population and histogram their means. The sampling distribution of $\bar X$ tends to $N\!\left(\mu,\sigma^2/n\right)$ as $n$ grows, whatever the population.

samples drawn
mean of $\bar X$
SE $\approx\sigma/\sqrt n$

12. Law of Large Numbers

Flip a biased coin repeatedly; the running proportion of heads converges to the true $p$. Short runs wander; long runs settle. This is the empirical face of probability.

flips
heads
proportion