Two-way tables and probability

    Understanding Two-Way Tables and Probability

    Two-way tables (also known as contingency tables) are powerful tools used in statistics to display the frequencies or relative frequencies of two categorical variables. Each cell in the table represents the count of observations that share a specific combination of categories for the two variables. They are fundamental for calculating various probabilities.

    Constructing a Two-Way Table

    A typical two-way table has rows representing categories of one variable and columns representing categories of another. The intersection of a row and a column (a cell) shows the number of individuals or observations that fall into both categories. Marginal totals are found in the margins of the table; they represent the totals for each category of a single variable, summing across the rows or down the columns. The grand total is the sum of all cell counts, representing the total number of observations.

    • Example: A table showing the relationship between gender (male/female) and preference for a new soft drink flavor (cherry/lime/orange).

    Types of Probabilities from Two-Way Tables

    Two-way tables are ideal for illustrating and calculating several types of probabilities:

    • Joint Probability: The probability of two events occurring together. It's calculated by dividing the count in a specific cell by the grand total. For example, P(A and B) = (Count of A and B) / (Grand Total).
    • Marginal Probability: The probability of a single event occurring, regardless of the outcome of the other variable. It's calculated by dividing a marginal total by the grand total. For example, P(A) = (Marginal Total for A) / (Grand Total). This is also known as a simple probability.
    • Conditional Probability: The probability that an event will occur given that another event has already occurred. This is denoted as P(A | B), read as "the probability of A given B." The key here is that the sample space is reduced to only include observations where event B has occurred. It's calculated by P(A | B) = P(A and B) / P(B), or from the table as (Count of A and B) / (Marginal Total for B).

    Checking for Independence

    Two events, A and B, are considered independent if the occurrence of one does not affect the probability of the other. In the context of two-way tables, independence can be checked in several ways:

    • If P(A | B) = P(A)
    • If P(B | A) = P(B)
    • If P(A and B) = P(A) * P(B)

    If any one of these conditions holds true, the events are independent. If they do not, the events are dependent.

    Relative Frequencies

    Instead of raw counts, two-way tables can also display relative frequencies. These are proportions or percentages obtained by dividing the counts by the grand total. They provide a direct way to view probabilities within the table. For example, a cell entry showing 0.15 means there's a 15% probability of observing that specific combination of categories.

    Mastery of two-way tables is crucial for understanding relationships between categorical variables and for making informed probability calculations in AP Statistics.

    Practice questions

    1

    A survey asked 100 students if they prefer chocolate or vanilla ice cream and if they prefer cones or cups. 30 students preferred chocolate in a cone, 20 preferred vanilla in a cone, 25 preferred chocolate in a cup, and 25 preferred vanilla in a cup. What is the marginal probability that a randomly selected student prefers chocolate ice cream?

    2

    Using the data from the previous question, what is the joint probability that a randomly selected student prefers vanilla ice cream AND a cone?

    3

    Based on the same survey data, what is the conditional probability that a student prefers a cup, GIVEN that they prefer vanilla ice cream?

    4

    Are the events 'prefers chocolate ice cream' and 'prefers a cone' independent based on the given survey data? Justify your answer.

    Practice more free →

    Free AP4U account — unlimited practice, AI grader, and progress tracking.

    Canonical: https://apforu.com/ap/statistics/unit-4-probability-random-variables-and-probability-distributions/two-way-tables-and-probability