Learn to make data-driven decisions using statistical inference, hypothesis testing, and real-world examples from PCCC to Instagram ads.
Imagine you're deciding whether to bring an umbrella to class. You look outside—dark clouds, windy—and you think, "It's probably going to rain." You just made an inference. You took limited information (what you can see right now) and drew a conclusion about what's likely to happen.
Statistical inference works the same way, but with data instead of weather. Statistical inference is the process of using data from a sample to draw conclusions about a larger population.
Population: Not "all values in set N" → Think: "Every student at PCCC"
Sample: Not "subset of N" → Think: "50 students from your CIS class"
Why? We study the sample to learn about the population—because we can't survey everyone!
You look outside and see dark clouds. That's your "sample" of information.
Based on past experience (dark clouds → rain), you conclude it'll probably rain. That's inference!
Every dish the restaurant has ever served and will serve.
You ate there 3 times, food was great each time. You infer: "This restaurant is good!"
We use small pieces of information (samples) to make educated guesses about the bigger picture (population). That's the heart of statistical inference.
Before diving into statistics, let's review the scientific method—the backbone of any good research:
What do you want to know? (e.g., "Do PCCC students get enough sleep?")
Has anyone studied this before? What did they find?
Make an educated guess about the answer.
Gather information through surveys, experiments, or observations.
Crunch the numbers, make charts, look for patterns.
What does the data tell you? Does it support your hypothesis?
Throughout this guide, we'll follow two students investigating claims about the connection between sleep and academic performance. They want to test:
| Observational Study | Experiment |
|---|---|
| You observe and record what naturally happens without interference. | You actively control conditions by assigning treatments to different groups. |
| Example: Survey students about their sleep and GPA. | Example: Randomly assign students to sleep 6 hours or 8 hours, then measure GPAs. |
| Can show: Associations or correlations | Can show: Cause-and-effect relationships |
Just because two things are related doesn't mean one causes the other. This is where confounding variables come in.
Think of it like this: It's a hidden "third thing" that makes two other things look connected when they're not really causing each other.
You notice people carrying umbrellas are more likely to get wet. Does the umbrella cause wetness?
People carry umbrellas when it's raining. Rain causes both umbrella-carrying AND getting wet. The umbrella doesn't cause wetness!
Cities with high ice cream sales have more drowning deaths. Does ice cream cause drowning?
Hot weather increases ice cream sales AND swimming (more drowning risk). Temperature affects both variables.
In controlled experiments, when you randomly assign people to groups (Treatment A vs. Treatment B), confounding factors get equally distributed. This lets you make causal claims!
Your friend claims he never misses a free throw. You watch him take 10 shots, and he misses 7.
What do you think? "He was clearly lying!"
Why? Because missing 7 out of 10 is too weird if he truly never misses.
That gut feeling = Statistical Significance
A result is statistically significant if it's so rare that we don't believe it happened by luck alone.
"This is too weird to be just chance—something else must be going on."
This result is too rare to be explained by random chance alone (assuming nothing special is happening).
It doesn't mean the result is good, correct, or important. Just that it's unlikely to be pure luck.
H₀ (Null): The coin is fair (50% heads)
Hₐ (Alternative): The coin is NOT fair
Flip the coin 25 times → observe 21 heads
If fair, we'd expect ~12-13 heads. But we got 21! That's way off.
Simulate 1,000 fair coin flips (25 each). Only 2 out of 1,000 got 21+ heads → p-value = 0.002
p-value (0.002) < 0.05 threshold → Reject H₀. The coin is probably not fair!
Think in stories, not formulas:
Formula way: "Probability of observing data at least as extreme as what we got, assuming H₀ is true"
Story way: "Assuming nothing special is happening, how often would we see something this weird or weirder?"
Even simpler: "How surprising is my result if the coin is fair / nothing is going on?"
| Term | Formula Definition | Story Definition |
|---|---|---|
| Null Hypothesis (H₀) | Default assumption; nothing special happening | "The coin is fair" / "Sleep doesn't affect GPA" |
| Alternative Hypothesis (Hₐ) | What you're trying to prove | "The coin is biased" / "Sleep DOES affect GPA" |
| P-value | P(data | H₀) | "How surprising is my result if H₀ is true?" |
| Significance Level (α) | Threshold for p-value | "How weird is weird enough?" (Usually 0.05 = 5%) |
| Statistic | Summary value from sample | "21 heads in 25 flips" / "Average GPA = 3.97" |
If p-value < 0.05 (or your chosen α), reject the null hypothesis. This means your result is statistically significant—too weird to be just chance!
When to use: Studying what percentage/fraction of a population has a characteristic.
Example question: "What proportion of PCCC students get 8+ hours of sleep?"
H₀: Proportion = 0.5 (national average)
Hₐ: Proportion < 0.5
Sample: 32.8% (0.328) of students get 8+ hours of sleep
Most simulations cluster around 0.5 (the peak). Our observed 0.328 is way out in the left tail—super rare!
p-value = 0.005 means only 5 out of 1,000 simulations produced results as extreme as 0.328.
"If nothing special is happening, most results look like the middle. Our result is way out in the rare zone, so something special probably IS happening!"
When to use: Studying the average value of a continuous variable.
Example question: "Is the average GPA at our school higher than the national average?"
Compares sample mean to a known population value (e.g., "Is our GPA different from 3.0?")
Compares means of two groups (e.g., "Do group study students score higher than solo students?")
H₀: Mean GPA = 3.0
Hₐ: Mean GPA > 3.0
Sample: They surveyed students at their school (not everyone—maybe 50-100 students). Sample mean = 3.97
Why sample? Time, resources, practical constraints—even in a small school, 100% participation is hard!
Analysis: One-sample t-test → t-statistic = 21.796, p < 0.001
Plain English: If the true GPA were 3.0, getting a sample mean of 3.97 is extremely unlikely. We reject H₀—the school's GPA is significantly higher than 3.0!
When to use: Studying whether two continuous variables are related.
Example question: "Is there a relationship between hours of sleep and GPA?"
r = +1: Perfect positive relationship
r = 0: No linear relationship
r = -1: Perfect negative relationship
H₀: r = 0 (no relationship)
Hₐ: r > 0 (positive relationship)
Data: Sample r = 0.47
Finding r = 0.47 does NOT prove that sleep causes higher GPAs. This is an observational study—confounding variables could be at play!
To prove causation, you'd need a controlled experiment with random assignment.
Sometimes you'll make the wrong decision. Here are the two types of errors:
What it is: Rejecting H₀ when it's actually true
Plain English: You think something is happening when it's not
Example: You conclude sleep and GPA are related when they're actually not
Analogy: Fire alarm goes off when there's no fire
What it is: Failing to reject H₀ when it's actually false
Plain English: You miss something that's actually happening
Example: You conclude sleep and GPA are NOT related when they actually are
Analogy: Fire alarm doesn't go off when there IS a fire
Companies use statistical inference through A/B testing—a randomized experiment comparing two versions.
Version A (control) and Version B (treatment with a change)
Half see Version A, half see Version B
Track metrics like clicks, purchases, sign-ups
Use two-sample t-test to see if Version B is significantly better
Roll out the better version to everyone
Traditional rating system users were familiar with.
Simpler binary choice. Result: More user engagement → Netflix switched to thumbs!
A nonprofit wanted to increase donations. They tested button text:
| Version | Donations | Avg Amount | % Increase |
|---|---|---|---|
| A: "Find a Borrower" | 127 | $25.00 | — |
| B: "Invest in Hope" | 142 | $25.42 | +11.8% |
Two-sample t-test: p-value = 0.023 < 0.05
Plain English: The difference in donation counts is statistically significant. If both buttons were equally effective, we'd only see a difference this large 2.3% of the time by random chance.
Decision: Implement Version B ("Invest in Hope") for all users!
P-hacking: Manipulating data or analysis to artificially get p < 0.05. This is unethical!
Examples:
Always be honest with your data and methods!
Use sample data to draw conclusions about a larger population
"If H₀ is true, how surprising is my result?"
Result is too rare to be just chance—reject H₀
Remember: Think in stories, not formulas. Statistical significance means "too weird to be just luck." Correlation ≠ causation (watch for confounding variables). Only experiments with random assignment can prove causation!
Statistical inference is a powerful tool for understanding the world. With these concepts, you can evaluate research claims, make data-driven decisions, and contribute to solving real problems. Keep practicing, stay curious, and remember—every expert was once a beginner!