00:02
According to the new jersey transit, a specific train has a 90 % chance of arriving on time.
00:10
However, one specific person observed that six weekdays, when he fixed six weekdays at random, the train arrived late two of those days.
00:22
So train was late two out of six days.
00:29
So we want to test whether or not this claim that the train is on time, 90 % of the time, is actually true.
00:38
So how do we do this? let's design and carry out the simulations to be following the four -step process.
00:44
So what are the four steps? well, first we have state.
00:48
So state the question.
00:50
So we want to test, but we want to know what is the chance that the train, is late two out of six days if it is on time 90 % of the time.
01:14
So we assume it's on time 90 % of the time and what's the probability that we observe this specific case that's late two out of six days.
01:25
So let's plan.
01:27
Plan our simulation.
01:28
How do we simulate this? well, what we could do is we could generate a random number, or let's generate six random numbers, actually, one for each day, six random digits, so in between zero and nine.
01:53
So, and then we say, if the digit is anything but zero, the train was on time.
02:09
So this is a valid simulation for this 90 % chance of arriving on time because you can check, well, the probability of a digit being zero is one out of the total number of digits, which is 10.
02:27
So the probability that it's not on time is 0 .1.
02:33
Okay, so we generate our six random digits in each one...