M303 Hypothesis Testing II

FALL 2026 · LECTURE 15
M303
Hypothesis Testing II
Compare two means by recognizing whether the observations are paired or independent.

Where we are

Problem formulationResearch designData collectionData analysis & recommendation
COMPLETEDHypothesis-testing logic

Sampling error · p-values · null and alternative hypotheses · one-sample t-test

TODAYTwo-mean comparisons

Paired observations versus independent groups

Learning Objectives

01Recognize

Whether two observations are paired or independent.

02State

Null and alternative hypotheses for two-mean questions.

03Run

Paired and independent-samples t-tests with the M303 Web Tools.

04Interpret

Means, test statistics, and one- or two-tailed p-values.

Previous class review

01

A p-value is the probability of observing data this extreme, or more extreme, if H₀ were true.

02

A larger p-value provides stronger evidence against H₀.

03

“No effect” or “no difference” usually belongs in the alternative hypothesis.

04

A one-sample t-test compares one population mean with a benchmark.

Choose the analysis from the variables

Two continuous ratings come from the same respondent. Which test?
ONE CONTINUOUS VARIABLEOne-sample t-test

Compare a mean with a benchmark.

TWO LINKED CONTINUOUS VARIABLESPaired t-test

Compare two linked means.

CONTINUOUS DV + CATEGORICAL IVIndependent t-test / ANOVA

Compare means across independent groups.

TWO CATEGORICAL VARIABLESChi-square

Test association between categories.

Use a paired t-test for two linked means

SAME RESPONDENT
Two different variables

Example: each participant rates both KitKat and Twix.

SAME RESPONDENT
Before and after

Example: willingness to pay before and after a direct-mail campaign.

Both measurements must be continuous.

The test analyzes the mean of the within-person differences—not two unrelated group means.

Paired example: KitKat vs. Twix

CANDIES DATA

Each participant rates both brands on the same 1–11 favorability scale.

Are the two population mean evaluations different?

Paired data: the source observations

Participant
KitKat
Twix
1101125113924385114 65171028108949
PAIRING RULEKeep each participant’s two ratings on the same row.

The source output uses all 25 paired observations; the source data illustration displays the values shown here.

Run the paired test with the M303 Web Tools

t↔
Paired t-testkoraycosguner.github.io/tools.html

Instructions and required data files will be posted on Canvas.

01

Load the data with one row per respondent and both measurements in separate columns.

02

Select the two continuous variables in the correct comparison order.

03

Choose the two-tailed, right-tailed, or left-tailed alternative.

04

Run the test and record the two means, mean difference, test statistic, and p-value.

Paired t-test output: exact source values

Statistic
KitKat
Twix
Mean7.126.28 Variance10.8610.54333333 Observations2525
Statistic
Value
Pearson correlation0.043455932 Hypothesized mean difference0 df24 t statistic0.928228742 P(T≤t), one-tail0.181265472 t critical, one-tail1.71088208 P(T≤t), two-tail0.362530944

Interpret the paired-test output

Two-tailed

Use when the question is whether the two means differ: Hₐ: μD ≠ 0.

Right-tailed

Use when the first mean is hypothesized to be higher: Hₐ: μD > 0.

Left-tailed

Use when the first mean is hypothesized to be lower: Hₐ: μD < 0.

Compare the matching p-value with .05.

Then report the direction and size of the mean difference in the language of the brand question.

In-class exercise: email campaign

EMAILMARKETING DATA

An online retailer records weekly revenue for the same 500 customers before and after sending an email offer.

Did the campaign increase average weekly revenue?

Your analysis plan

Identify the two paired columns.

Write a directional alternative.

Run the paired t-test and translate the result into a campaign decision.

Choose the next test from the variables

One continuous outcome. One categorical grouping variable with two independent groups. Which test?
ONE BENCHMARKOne-sample t-test
SAME PEOPLEPaired t-test
TWO INDEPENDENT GROUPSIndependent-samples t-test
THREE OR MORE GROUPSANOVA F-test

Use an independent t-test for two separate groups

DEPENDENT VARIABLE
Continuous

Minutes on a website · purchase amount · liking score.

INDEPENDENT VARIABLE
Categorical · two levels

Group A vs. Group B, with different observations in each group.

Ask whether the two population means differ.

Example: Is average time spent on Amazon different across two customer groups?

Independent example: time spent on Amazon

CUSTOMER SESSION DATA

The manager records the number of minutes customers spend on Amazon before ordering. Customer records include two gender groups.

Does average time on the site differ between the groups?

Independent-groups data: source observations

Observation
Group 1
Group 2
1125322574373164345051231 65621729618435995139
INDEPENDENCE RULEEach observation belongs to only one group.

The source labels these groups Female and Male; M303 uses neutral group labels while retaining every displayed value.

Run the independent test with the M303 Web Tools

t∥
Independent-samples t-testkoraycosguner.github.io/tools.html

Instructions and required data files will be posted on Canvas.

01

Load one continuous outcome and one two-level grouping variable.

02

Select the outcome and identify the two groups to compare.

03

Choose the alternative direction before viewing the result.

04

Run the test and record each group mean, the mean difference, test statistic, and p-value.

Independent t-test output: exact source values

Statistic
Group 1
Group 2
Mean42.7229.84 Variance365.5433333485.3066667 Observations2525
Statistic
Value
Hypothesized mean difference0 df47 t statistic2.207798153 P(T≤t), one-tail0.016087348 t critical, one-tail1.677926722 P(T≤t), two-tail0.032174696 t critical, two-tail2.011740514

Interpret the independent-test output

Two-tailed

Use when the question is whether the two group means differ.

Right-tailed

Use when Group 1 is hypothesized to have the higher mean.

Left-tailed

Use when Group 1 is hypothesized to have the lower mean.

Statistical significance answers “is there evidence of a difference?”

The group means answer “which group is higher, and by how much?”

In-class exercise: who spends more?

01

Does mean purchase amount differ across two gender groups?

Yes / No
02

Does mean purchase amount differ across degree groups?

Yes / No
03

Does mean purchase amount differ across marital-status groups?

Yes / No
Use the independent t-test only when the grouping variable has two levels.

If a grouping variable has three or more levels, move to ANOVA.

Paired or independent?

PAIRED
Two measurements from the same unit

Brand A and Brand B ratings from each participant · revenue before and after the email.

INDEPENDENT
One measurement from separate groups

Time on site for Group A vs. Group B · purchase amount across two customer groups.

The data structure—not the topic—determines which t-test you use.

To sum up

01

Paired t-test: compare two linked continuous measurements from the same unit.

02

Independent-samples t-test: compare one continuous outcome across two separate groups.

03

State the direction of Hₐ before selecting the matching one- or two-tailed p-value.

04

Interpret the group means and difference—not only the significance decision.

Next class

NEXT TOPIC
ANOVA F-tests and chi-square tests
BE READY TO
  1. Compare a continuous outcome across three or more groups.
  2. Distinguish mean comparisons from categorical associations.
  3. Compute expected counts under independence.