Part 1

Mutually exclusive events mean they cannot occur at the same time (an either/or situation). Most commonly this can be explained in a situation where if you flip a coin, it cannot be heads and tails, it will land on one of the two.

Independence on the other hand is when one event does not affect the occurrence or nonoccurrence of the other event. For example me flipping heads on a coin flip won't impact me rolling a 5 on a die.

Experiment:

You are flipping a coin first and rolling a six sided die. What is the probability of flipping tails and then rolling a 6?

Sample size: 12 possible out comes total: (2 sides of coin * 6 sides of die)

  • H1, H2, H3, H4, H5, H6, T1, T2, T3, T4, T5, T6

Terms:

  • Mutually exclusive: Coin landing on heads (event 1) and coin landing tails (event 2) on a single turn. They cannot both occur, it will either land on heads or tails but not both.

  • Not mutually exclusive: Coin landing on tails (event 1) and rolling an even number on the die (event 2), they can both occur in the same turn.and thus not mutually exclusive

  • Independent: Coin landing on tails (event 1) and rolling an odd number on the die (event 2). Your outcome on landing tails will not determine which number you can/will roll on the die.

  • Not independent: If we changed the experiment to picking 2 winning tickets from a hat containing blue, red, orange, and purple tickets (20 tickets total). Picking the first ticket from the hat (event 1) and then the second ticket (event 2) in which the probability of drawing a ticket will have had changed compared to the first draw as there is one less ticket.

Part 2

Titanic_data <- read.csv('/Users/bryan_calderon/Desktop/Data Analysis/HW 1/titanic/train.csv')
table(Titanic_data$Survived,
      Titanic_data$Sex, 
      Titanic_data$Pclass
      )
## , ,  = 1
## 
##    
##     female male
##   0      3   77
##   1     91   45
## 
## , ,  = 2
## 
##    
##     female male
##   0      6   91
##   1     70   17
## 
## , ,  = 3
## 
##    
##     female male
##   0     72  300
##   1     72   47

The below were done on excel via pivot tables:

Based on the above tables, I found: