# 2.1.1 - One Categorical Variable

Data concerning one categorical variable can be summarized using a proportion.

Proportion
$$Proportion=\dfrac{Number\;in\;the\;category}{Total\;number}$$

The symbol for a sample proportion is $$\widehat{p}$$ and is read as "p-hat." The symbol for a population proportion is $$p$$.

The formula for a sample proportion may also be written as $$\widehat p = \frac{x}{n}$$ where $$x$$ is the number in the sample with the trait of interest and $$n$$ is the sample size.

A proportion must be between 0 and 1.00.

## Example: Black Cards Section

A standard 52-card deck contains $$26$$ red cards and $$26$$ black cards. What proportion of cards are black?

$$p=\dfrac{26}{52}=0.50$$

The symbol $$p$$ was used because this is the proportion of all cards (i.e., the population) that are black.

## Example: World Campus Undergraduate Students Section

In the Fall 2014 semester, there were $$82,382$$ undergraduate students enrolled in Penn State. Of those, $$6,245$$ were World Campus students. What proportion of all Penn State undergraduate students were World Campus students?

$$p=\dfrac{6245}{82382}=0.076$$

The symbol $$p$$ was used because this is the proportion of all Penn State undergraduate students (i.e., the population) that are World Campus students.

In a sample of $$30$$ randomly selected packages of chocolate chip cookies, $$18$$ contained broken cookies. What proportion of these selected packages had broken cookies?
$$\widehat{p}=\dfrac{18}{30}=0.60$$
These data were collected from a sample so the symbol $$\widehat{p}$$ was used to denote a sample proportion.