prop.test() — Proportion test

Checks if a share is really different from what you guessed.

prop.test(x, n, p)

Key idea

Definition

the observed sample proportion
the proportion you are testing against
the sample size
the test statistic

In plain words

You think a coin is fair, but 60 of 100 flips were heads. Is the coin really unfair, or was that just luck? This tells you.

Where you'd use it

Worked example 13

You expected p = 0.5 but got 60 heads in 100 flips. The test says how surprising that is (p-value ≈ 0.05).

Frequently asked questions

What do I feed prop.test?
Counts of successes and totals — not proportions.