haidingluo
I. Independence means that two variables or events do not affect each other, and the occurrence of one event does not influence the probability of the other event occurring.
Mutually exclusive means that two categories or events cannot occur simultaneously; they are distinct and independent of each other.
Example:
10 pieces of cardboard, each with numbers from 1 to 10 written on them in colored pens. Drawing one card at a time.
Outcome/sample space = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}
Mutually Exclusive Events: Drawing cards with odd numbers written on them and drawing cards with even numbers written on them. Since drawing an odd number makes it impossible to draw an even number, these two events are mutually exclusive.
Non-Mutually Exclusive: Drawing a card with a number greater than 8 and also being even. If you draw a 10, it satisfies both of these conditions simultaneously, so these two events are not mutually exclusive.
Independent Events: You randomly draw one card, and the number is 1. Then you randomly draw another card, and the number is 5. However, the first draw does not affect your ability to draw another card. Therefore, drawing the first card and drawing the second card are independent events.
Non-Independent Event: drawing a card with a number greater than 8 and also being even. If you draw a 10, it satisfies both of these conditions simultaneously, so these two events are not independent. This means that the outcome of one event affects the outcome of the other event because they can both be true at the same time .
II.
train=read.csv(file.choose(),header=T)
table(train$Survived,
train$Sex,
train$Pclass
)
## < table of extent 0 x 0 x 0 >