Question 1:

Mutually exclusive : Two events, A and B, are mutually exclusive if they cannot both occur at the same time. In other words, if Event A happens, then Event B cannot happen (and vice versa). P(A or B)=P(A)+P(B) Not mutually exclusive :Two events, A and B, are not mutually exclusive if they can both occur at the same time. P(A or B)=P(A)+P(B)-P(A and B)

Independent :If the occurrence of one event, A, does not impact the chance that the other event will also take place, then the two occurrences, A and B, are said to be independent of one another. P(A∩B)=P(A)⋅P(B)

Not independent :If the occurrence of one event impacts the likelihood of another event, then the two occurrences, A and B, cannot be said to be independent of one another.

suppose we have a list of number on dice which we have once chance to roll

q1_dise <- list(1,2,3,4,5,6)

For a Mututally Excusive example, we will roll A: roll an even number B: roll an odd number Not Mututally Excusive Example, We will require to roll A: roll a Prime number B: roll an even number

Independent Events: Rock paper & scissors is not relate to rolling dice. Not independent Events: Rock paper & scissors to determind who roll dice first.

Question 2: The code which we use is

“table(mydata\(Survived, mydata\)Sex, mydata$Pclass )”

And by following the example which provide on the insduction, datas are attach within the zipfile.(was unable to save in the Rstudio and the Excel)