Exercises for Chapter 4 (Part B).

Exercises for Chapter 4 (Part B).#

  1. Single Die Roll Variance: You roll a fair six-sided die.

    • What is the probability of rolling an even number?

    • What is the probability of rolling a number greater than 4?

    • What is the probability of rolling a prime number? (Consider 1 not to be prime)

  2. Deck of Cards - Specific Properties: You draw one card from a standard 52-card deck.

    • What is the probability of drawing a face card (Jack, Queen, King)?

    • What is the probability of drawing a card that is NOT a Spade?

    • What is the probability of drawing a red Ace (Ace of Hearts or Ace of Diamonds)?

  3. Two Fair Coin Flips: You flip two fair coins.

    • What is the sample space for this experiment?

    • What is the probability of getting at least one Tail (T)?

    • What is the probability of getting two Heads (HH)?

  4. Rainy Days Probability: The probability of rain on any given day in a city is 0.3. Assume that the weather on any day is independent of the weather on other days.

    • What is the probability that it does not rain on a given day?

    • What is the probability that it rains on Monday AND Tuesday?

    • What is the probability that it rains on Monday OR Tuesday (or both)?

  5. Dice Sum Condition: You roll two fair six-sided dice.

    • What is the probability that the sum of the dice is 6?

    • Given that the first die shows a 2, what is the probability that the sum is 6?

    • Are the events “sum is 6” and “first die shows a 2” independent?

  6. Drawing Two Cards Consecutively: You draw two cards from a standard 52-card deck without replacement.

    • What is the probability of drawing a King first, then a Queen second?

    • What is the probability of drawing a King and a Queen in any order?

  7. Checking Independence of Events: Let A and B be two events. Suppose \(P(A) = 0.4\), \(P(B) = 0.5\), and \(P(A \cup B) = 0.7\).

    • Find \(P(A \cap B)\).

    • Are events A and B independent?

  8. Family with Two Children: A family has two children. Assume the probability of having a boy (B) or a girl (G) is equal (0.5) and independent for each child.

    • What is the probability that both children are boys?

    • Given that at least one child is a boy, what is the probability that both children are boys?

  9. Survey Data: Coffee and Productivity: A survey of 100 office workers found:

    • 60 drink coffee.

    • 40 of those who drink coffee report feeling productive in the morning.

    • 30 of those who do NOT drink coffee report feeling productive in the morning. Let C be the event a worker drinks coffee, and P be the event a worker feels productive.

    • Find \(P(C)\).

    • Find \(P(P | C)\).

    • Find \(P(P | \\neg C)\).

  10. Defective Parts from Machines: A factory has two machines, A and B.

    • Machine A produces 60% of the daily output, and 5% of its products are defective.

    • Machine B produces 40% of the daily output, and 3% of its products are defective.

    • What is the probability that a randomly selected part was made by Machine A and is defective?

    • What is the probability that a randomly selected part was made by Machine B and is NOT defective?

  11. Balls in an Urn (Two Draws): An urn contains 5 red balls and 3 blue balls. You draw two balls from the urn without replacement.

    • What is the probability that both balls drawn are red?

    • What is the probability that the first ball is red and the second ball is blue?

    • What is the probability that one ball is red and one ball is blue (in any order)?

  12. Course Prerequisites and Passing: To take Course B, a student must first pass Course A.

    • The probability a student passes Course A is \(P(A\_p) = 0.7\).

    • If a student passes Course A, the probability they also pass Course B is \(P(B\_p | A\_p) = 0.8\).

    • What is the probability a student passes both Course A and Course B?

    • What is the probability a student passes Course A but fails Course B? (Assume \(P(B\_f | A\_p) = 1 - P(B\_p | A\_p)\))

  13. Alternative Medical Test Scenario (Law of Total Probability): A different disease affects 2% of the population. A new test has a 95% chance of correctly identifying an infected person (sensitivity) and a 10% chance of incorrectly identifying a healthy person as infected (false positive rate). What is the overall probability that a randomly selected person tests positive?

  14. Bayes’ Theorem Application: Using the information from the “Alternative Medical Test Scenario” (Exercise 13): if a randomly selected person tests positive, what is the probability they actually have the disease?

  15. Three Printers Error Rates: A company has three printers: P1, P2, and P3, which print 30%, 50%, and 20% of all documents, respectively. The error rates for these printers are 1%, 2%, and 3%, respectively. If a randomly selected document has an error, what is the probability it came from P1?

  16. Simplified Email Spam Filter: Suppose 70% of emails are legitimate (ham) and 30% are spam.

    • The word “free” appears in 10% of spam emails.

    • The word “free” appears in 1% of ham emails. If an email contains the word “free”, what is the probability it is spam?

  17. Simple Lottery Probability: In a mini-lottery, you pick 2 distinct numbers from the set \({1, 2, ..., 10}\). The lottery also picks 2 distinct numbers from this set. What is the probability your two chosen numbers exactly match the lottery’s two numbers?

  18. Committee Selection with Specific Roles: A committee of 3 people is to be selected from a group of 5 men and 4 women.

    • What is the total number of ways to form the committee?

    • What is the probability that the committee consists of exactly 2 men and 1 woman?

    • If the committee must have a Chair, a Secretary, and a Treasurer, and these roles are assigned after the 3 people are selected, how many ways can the roles be assigned to a specific committee of 3?

  19. Marble Selection Probability: An urn contains 4 red, 3 green, and 2 blue marbles. You randomly select 3 marbles without replacement. What is the probability that you select exactly 1 of each color (1 red, 1 green, 1 blue)?

  20. Simple Dice Game Expected Value: You play a game where you roll one fair six-sided die.

    • If you roll a 6, you win $10.

    • If you roll a 1, you lose $4.

    • If you roll any other number (2, 3, 4, 5), you win $0. What is the expected value of playing this game once?

  21. Raffle Ticket Expected Value: A charity sells 500 raffle tickets for \(2 each. There is one grand prize of \)300 and two second prizes of $50 each.

    • What is the expected value of buying one ticket from the perspective of the buyer?

    • Is this a “fair” game for the buyer?

  22. Investment Decision Expected Value: You have $1000 to invest.

    • Investment A: 70% chance to return $1200 (profit $200), 30% chance to return $800 (loss $200).

    • Investment B: 40% chance to return $1500 (profit $500), 60% chance to return $900 (loss $100). Calculate the expected profit for each investment. Which investment has a higher expected profit?

  23. Biased Coin Flip Simulation: A coin is biased such that it lands on Heads (H) with a probability of 0.6 and Tails (T) with a probability of 0.4.

    • Describe how you would simulate flipping this coin 1000 times.

    • After the simulation, how would you verify if the observed frequencies of Heads and Tails are close to their theoretical probabilities?

  24. Birthday Problem Simulation (Approximate): The “Birthday Problem” asks for the probability that in a group of N people, at least two share a birthday.

    • Describe how you would simulate this for \(N=23\) people to estimate this probability. Assume 365 days in a year and equal likelihood for each birthday.

    • How would you calculate the estimated probability from many simulation trials?

  25. Simulating Drawing Specific Cards: You draw 3 cards from a standard 52-card deck without replacement.

    • Describe how you would modify a card drawing simulation to estimate the probability of drawing exactly 2 Hearts out of the 3 cards drawn.

    • How would you calculate this estimated probability?

  26. Titanic Dataset: Survival by Sex: Using the Titanic dataset (commonly available in libraries like Seaborn or as a CSV):

    • Calculate \(P(\text{Survived} | \text{Sex='female'})\) (the probability of survival given the passenger was female).

    • Calculate \(P(\text{Survived} | \text{Sex='male'})\) (the probability of survival given the passenger was male).

    • What do these probabilities suggest about survival likelihood based on sex?

  27. Titanic Dataset: Child Survivors: Using the Titanic dataset, define a “child” as someone with an age less than 18.

    • Calculate \(P(\text{Child} | \text{Survived}=1)\) (the probability a survivor was a child).

    • Calculate \(P(\text{Child} | \text{Survived}=0)\) (the probability a non-survivor was a child).

    • What might these probabilities indicate about the survival priority of children?

  28. Iris Dataset: Species Prediction based on Petal Width: Load the Iris dataset (e.g., via scikit-learn or Seaborn).

    • Choose a threshold \(X\) for ‘petal width (cm)’ (e.g., \(X=1.5 \text{ cm}\)).

    • Calculate \(P(\text{Species='virginica'} | \text{Petal Width} \> X)\).

    • Calculate \(P(\text{Species='setosa'} | \text{Petal Width} \< 0.5 \text{ cm})\). (Note: Setosa typically has small petal width).

    • What do these conditional probabilities suggest about using petal width to help identify species?

  29. Gambler’s Fallacy Explanation: Explain the Gambler’s Fallacy using the example of flipping a fair coin. If you flip a fair coin 5 times and get Heads each time (HHHHH), what is the probability of getting Heads on the 6th flip? Why do some people incorrectly believe the probability changes?

  30. The Monty Hall Problem: State the Monty Hall problem. Explain the optimal strategy and why it works, referring to conditional probabilities if possible.