Lesson 2.1: Probabilities of Events

Software Lab 2.1

Probability Basics

The goal of this lab is to work through some basic probability calculations using the examples of rolling a die and selecting a playing card.

As you work through the lab, answer the ungraded exercises in the shaded boxes. Check your answers by consulting the Software Lab 2.1 Solutions.

Remember to complete the graded Software Lab Questions for this section in Moodle.

Rolling a Die

Data representing 10,000 simulated rolls of a fair, six-sided die are stored in a dataset called dice, which you can download from dice [CSV file] (OpenIntro, n.d.). The dataset contains a single variable, y, which represents the outcome (a number from 1 to 6) for each die roll.

Once you’ve downloaded the dice dataset, open the jamovi menu (the three horizontal lines in the top-left corner), select Open, then Browse, and select the file in the location you downloaded it to. Explore the data by clicking the Analyses tab, then clicking Exploration > Descriptives, then selecting y as the Variable, and checking Frequency tables and Plots > Bar plot. Confirm that the number of times a 1 was rolled was 1,671, the number of times a 2 was rolled was 1,680, and so on.

1. How many times was a 6 rolled? Which number was rolled the least number of times? Check your answers by consulting the Software Lab 2.1 Solutions.

Section 3.1 in OpenIntro Statistics defines the probability of an outcome as “the proportion of times the outcome would occur if we observed the random process an infinite number of times” (Diez et al., 2019) CC BY-SA 3.0. We can expand this definition to events consisting of a set of outcomes, i.e., the probability of an event is “the proportion of times the event would occur if we observed the random process an infinite number of times.”

If we let A represent the event where a die roll results in 1 or 2, then the probability of event A is P(A) = 2/6 = 1/3, since there are six equally likely outcomes (rolling 1, 2, 3, 4, 5, or 6), two of which are in event A (rolling a 1 or 2). We’ve only observed 10,000 die rolls rather than an infinite number of die rolls, so the proportion of die rolls in event A isn’t exactly 1/3, but it’s fairly close: (1,671+1,680) / 10,000 = 3,351 / 10,000 = 0.3351.

2. Let B represent the event where a die roll results in 4 or 6. Calculate the proportion of die rolls in event B.
3. Confirm the Addition Rule of Disjoint Events for this empirical example; i.e., that the proportion of die rolls in event A or event B is equal to the sum of the proportion of die rolls in event A and the proportion of die rolls in event B.
4. Let D represent the event where a die roll results in 2 or 3. Note that events A and D are not disjoint since they share an outcome in common (rolling a 2). Confirm that the Addition Rule of Disjoint Events does not hold for events A and D. In other words, show that the proportion of die rolls in event A or event D is not equal to the sum of the proportion of die rolls in event A and the proportion of die rolls in event D.

Selecting a Playing Card

Data representing 10,000 simulated draws of a playing card from a regular deck of 52 cards are stored in a dataset called cards, which you can download from cards [CSV file] (OpenIntro, n.d.). The dataset contains two variables: rank, which takes one of the values (2, 3, 4, 5, 6, 7, 8, 9, 10, Jack, Queen, King, Ace) and suit, which takes one of the values (Club, Diamond, Heart, Spade).

Once you’ve downloaded the cards dataset, open the jamovi menu using the three horizontal lines in the top-left corner, select Open, then Browse, and select the file in the location you downloaded it to. Explore the data by clicking the Analyses tab, then clicking Exploration > Descriptives, then selecting rank and suit as the Variables, and checking Frequency tables. Confirm that the card was a queen 761 times, and the card was a heart 2,509 times.

5. Let A represent the event where the card is red. What proportion of times did event A occur?
6. Calculate the proportion of times the card was black two different ways: one directly using the frequency counts for clubs and spades, the other using the answer to question 5 and considering the complement of event A.
7. Move suit from the Variables box to the Split by box to create a contingency table. How many times was the card a queen of hearts?

Next, let A represent the event where the card is a queen and B represent the event where the card is a heart. Note that the probability the card is a queen is P(A) = 1/13, the probability the card is a heart is P(B) = 1/4, and the probability the card is the queen of hearts is P(A and B) = 1/52. These probabilities satisfy the condition for independent events since P(A) x P(B) = 1/13 x 1/4 = 1/52 = P(A and B).

Remember that the probability of an event is “the proportion of times the event would occur if we observed the random process an infinite number of times.” In the cards dataset we’ve only observed the random process 10,000 times, so the proportion of times the card was the queen of hearts won’t be exactly equal to the product of the proportion of times the card was a queen and the proportion of times the card was a heart, but it should be fairly close.

8. Confirm that the product of the proportion of times the card was a queen and the proportion of times the card was a heart is fairly close to the proportion of times the card was the queen of hearts.

Finally, let A represent the event where the card is a face card and B represent the event where the card is a king or an ace. Note that the probability the card is a face card is P(A) = 3/13, the probability the card is a king or an ace is P(B) = 2/13, and the probability the card is a jack, a queen, a king, or an ace is P(A and B) = 4/13.

9. Show that these probabilities do not satisfy the condition for independent events, P(A) x P(B) = P(A and B). This demonstrates that events A and B are not independent events (i.e., they are dependent events).
10. Confirm that the product of the proportion of times the card was a face card and the proportion of times the card was a king or an ace is not close to the proportion of times the card was a jack, a queen, a king, or an ace.
References

Diez, D. M., Çetinkaya-Rundel, M., Barr, C. D. (2019). OpenIntro Statistics (4th ed.). OpenIntro. https://www.openintro.org/book/os/

OpenIntro. (n.d.). Data sets [Data sets]. https://openintro.org/data/

License

Icon for the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License

Introduction to Probability and Statistics Copyright © 2023 by Thompson Rivers University is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License, except where otherwise noted.

Share This Book