Math 371- Probability and Statistics.

Why Probability and Statistics Matter

Statistics helps us organize, describe, and interpret data. Probability provides a mathematical way to reason about uncertain outcomes. Together, they are used in science, medicine, business, games, quality testing, and everyday decision-making.

This introduction covers descriptive statistics, probability rules, conditional probability, common distributions, confidence intervals, hypothesis testing, and relationships between variables.

Important distinction: Probability often starts with a model and predicts how likely an outcome is. Statistics often starts with observed data and uses it to estimate or learn about a larger population.

1. Populations, Samples, and Types of Data

A population is the entire group you want to understand. A sample is the subset you actually observe. A well-selected sample can help estimate population characteristics, but biased sampling can lead to misleading conclusions.

TermMeaningExample
PopulationThe full group of interestEvery student at a university
SampleA subset of the population150 students selected for a survey
ParameterA numerical feature of a populationPopulation mean, μ
StatisticA numerical feature calculated from a sampleSample mean, x̄
Categorical dataGroups or labelsEye color or course subject
Quantitative dataNumerical measurements or countsHeight, time, or number of visits

Sampling tip: Random selection can reduce selection bias. A larger sample does not automatically fix a biased sampling method.

2. Descriptive Statistics: Center and Spread

Descriptive statistics summarize a dataset. Measures of center describe a typical value; measures of spread describe how much the values vary.

Mean (average)

x¯=∑i=1nxin

Worked example: For the values 2, 4, 4, 6, and 9, add the values to get 25, then divide by 5. The mean is 5.

Median and mode

The median is the middle value after sorting the data. For an even number of values, average the two middle values. The mode is the most frequent value; a dataset can have more than one mode or no unique mode.

Range and sample variance

Range=xmax−xmins2=1n−1∑i=1n(xi−x¯)2

The sample standard deviation is the square root of the sample variance, s2. Standard deviation is expressed in the same units as the original data.

MeasureWhat it tells youSensitive to outliers?
MeanArithmetic averageYes
MedianMiddle of the ordered dataLess sensitive
RangeDistance from minimum to maximumYes
Standard deviationTypical spread around the meanYes
Interquartile range (IQR)Q₃ − Q₁; spread of the middle 50%Less sensitive

3. Basic Probability

Probability measures how likely an event is. A probability is between 0 and 1, inclusive. A value of 0 means impossible under the model; 1 means certain.

P(A)=# outcomes in A# equally likely outcomes

Worked example: A fair six-sided die has six equally likely outcomes. The probability of rolling a 4 is 1/6. The probability of rolling an even number is 3/6 = 1/2 because the favorable outcomes are 2, 4, and 6.

Complement rule

P(Ac)=1−P(A)

The complement of event A is the event that A does not occur. If the probability of rain is 0.3, the probability of no rain is 1 − 0.3 = 0.7, assuming these are the only two outcomes being considered.

Addition rule

P(A∪B)=P(A)+P(B)−P(A∩B)

Subtract the overlap so that outcomes belonging to both events are not counted twice. If A and B cannot happen at the same time, they are mutually exclusive and the intersection probability is zero.

4. Conditional Probability and Independence

Conditional probability asks for the probability of A when we know that B has occurred.

P(A|B)=P(A∩B)P(B)

This formula applies when P(B)>0.

Worked example: A class has 12 students who study biology, 8 who study chemistry, and 5 who study both. If a randomly selected student studies biology, the probability that the student also studies chemistry is 5/12.

Independent events

Events A and B are independent if knowing that one occurred does not change the probability of the other.

P(A∩B)=P(A)P(B)

Do not confuse independent with mutually exclusive: mutually exclusive events cannot both occur, while independent events do not affect each other’s probabilities.

5. Random Variables and Common Distributions

A random variable assigns a numerical value to each possible outcome. A discrete random variable has countable possible values; a continuous random variable can take values across an interval.

DistributionTypical useKey idea
BernoulliOne yes/no trialSuccess probability p
BinomialNumber of successes in n independent trialsFixed number of trials, same p
NormalMany naturally varying measurementsSymmetric, bell-shaped curve
UniformValues equally likely over a specified set or intervalEqual likelihood under the model
PoissonCounts of events in a fixed intervalRate parameter λ

Binomial probability

If there are n independent trials, each with success probability p, the probability of exactly k successes is:

P(X=k)=(nk)pk(1−p)n−k

Here, the binomial coefficient counts the different ways to arrange k successes among n trials.

Worked example: A fair coin is flipped 3 times. The probability of exactly 2 heads is (32)(12)2(12)1=38.

Normal distribution and z-scores

A z-score tells how many standard deviations a value is above or below the mean.

z=x−μσ

Worked example: A test score is 85, the mean is 70, and the standard deviation is 10. Then z = (85 − 70)/10 = 1.5. The score is 1.5 standard deviations above the mean.

A z-score does not by itself give a probability; use the normal distribution or a z-table to find the area associated with that score.

6. Sampling Distributions and the Central Limit Theorem

If repeated random samples are drawn from a population, the sample mean varies from sample to sample. The distribution of those sample means is called the sampling distribution of the mean.

SE(x¯)=σn

When the population standard deviation σ is unknown, a common estimate is s/n.

The Central Limit Theorem says that, under suitable conditions, the sampling distribution of the mean becomes approximately normal as sample size increases, even when the population itself is not normal. How large a sample is needed depends on the population shape and the presence of outliers or dependence.

7. Confidence Intervals

A confidence interval gives a range of plausible values for a population parameter using sample data and a method with a stated long-run coverage rate.

For a mean, when the population standard deviation is known and normal-based conditions apply, a confidence interval has the form:

x¯±zα/2σn

For a 95% confidence interval, the normal critical value is approximately 1.96. In many real settings, σ is unknown and a t-based interval is more appropriate.

Worked example: Suppose a sample mean is 50, the known population standard deviation is 10, and n = 100. The standard error is 10/√100 = 1. The interval is 50 ± 1.96(1), or approximately (48.04, 51.96).

Interpretation: In the frequentist interpretation, 95% describes the long-run success rate of the interval-making method over repeated samples. It does not mean that 95% of individual observations fall inside this interval.

8. Hypothesis Testing

Hypothesis testing evaluates how compatible observed data are with a specified null hypothesis. The null hypothesis, H₀, often represents no effect or no difference. The alternative hypothesis, H₁ or Hₐ, represents a competing claim.

  1. State H₀ and H₁ before examining the result, where possible.
  2. Choose a significance level α, often 0.05.
  3. Calculate a test statistic and p-value using an appropriate method.
  4. Compare the p-value with α and report the result in context.
Reject H0 if p≤α (under the chosen testing rule)

A p-value is the probability, assuming the null hypothesis and model assumptions are true, of observing a result at least as extreme as the one obtained. It is not the probability that the null hypothesis is true.

Statistical significance does not necessarily imply practical importance. Consider effect size, uncertainty, study design, and whether the assumptions are reasonable.

9. Correlation and Linear Regression

Correlation describes the strength and direction of a linear relationship between two quantitative variables. Pearson’s correlation coefficient r lies between −1 and 1.

r=∑i=1n(xi−x¯)(yi−y¯)∑i=1n(xi−x¯)2∑i=1n(yi−y¯)2
CorrelationGeneral interpretation
Near +1Strong positive linear association
Near 0Little or no linear association; a nonlinear pattern may still exist
Near −1Strong negative linear association

A simple linear regression model is:

y^=b0+b1x

The intercept b₀ is the model’s predicted value when x = 0; the slope b₁ describes the predicted change in y for a one-unit increase in x. Correlation and regression alone do not prove causation.

10. Practice Problems

Try solving each problem before revealing the answer.

Problem 1 — Mean:
Find the mean of 3, 5, 7, and 9.

Mean = (3 + 5 + 7 + 9) / 4 = 24 / 4 = 6.
Problem 2 — Median:
Find the median of 2, 4, 8, 10, and 12.

The data are already ordered. The middle value is 8.
Problem 3 — Basic probability:
A fair six-sided die is rolled. What is the probability of rolling a number greater than 4?

Outcomes 5 and 6 qualify, so P = 2/6 = 1/3.
Problem 4 — Complement:
If P(A) = 0.27, find P(not A).

P(not A) = 1 − 0.27 = 0.73.
Problem 5 — Addition rule:
If P(A) = 0.4, P(B) = 0.5, and P(A ∩ B) = 0.2, find P(A ∪ B).

P(A ∪ B) = 0.4 + 0.5 − 0.2 = 0.7.
Problem 6 — Conditional probability:
If P(A ∩ B) = 0.15 and P(B) = 0.3, find P(A | B).

P(A | B) = 0.15 / 0.3 = 0.5.
Problem 7 — Binomial probability:
A fair coin is flipped 4 times. What is the probability of exactly 1 head?

Using the binomial formula: C(4,1)(1/2)¹(1/2)³ = 4/16 = 1/4.
Problem 8 — Z-score:
A value is 72, the mean is 60, and the standard deviation is 6. Find its z-score.

z = (72 − 60) / 6 = 2. The value is two standard deviations above the mean.
Problem 9 — Confidence interval:
A sample mean is 20, the standard error is 2, and the 95% normal critical value is 1.96. Find the interval.

20 ± 1.96(2) = 20 ± 3.92, so the interval is (16.08, 23.92).
Problem 10 — Interpreting a p-value:
A test gives p = 0.03 with α = 0.05. Under the usual decision rule, what is the conclusion?

Because 0.03 ≤ 0.05, reject the null hypothesis under this test. This does not prove the alternative hypothesis or measure the size of an effect.

Challenge Problems

  1. For the data 4, 4, 6, 8, 13, calculate the mean, median, and range. Explain which measure of center is more affected by the high value.
  2. A bag contains 5 red and 3 blue counters. One counter is drawn at random. Find the probability it is blue, then find the probability it is not blue.
  3. Explain the difference between independent events and mutually exclusive events. Give an example of each.
  4. A study finds a positive correlation between time spent exercising and a health measure. Explain why this association alone does not establish that exercise caused the difference.

Study tip: Identify what a question asks for before choosing a formula. Write down the known values, check the assumptions, and interpret the answer in the context of the problem.