Probability theory - Logic, Notation, simulation

74 Views Asked by At

i need some help in probability theory. The thing is im not sure if im thinking about this correctly and if i express my thoughts correctly. I really got lost in all the dice examples of the internet.

Let $\ X\ \in \{1,0\} $ a binary outcome. Eg. missing the train in the morning, or not.

Let $\ p\ $be the probability of missing the train. $$ P(X=1) = p $$ $$ P(X=0) = 1-p $$ Lets say we use the train $\ n$ times, where each event is independent and identically distributed. Then im pretty sure that the probability of missing the train at least 1 time is: $$ 1-[(1-p)^n] $$ What is the correct notation for this Probability? This cant be correct: $$ P(X>=1 |\ n\ ) $$ What about the probability of missing the train exactly one time in $n$ events? I would guess its just $$ P(X=1|\ n \ ) = (1-p)^n \ * \ p $$ Also is the notation correct here?

Now how can i answer this question : "For which n there is a 100% probability of missing the train?" and should i use P("at least one time" | n ) or P("exactly one time" | n ) to answer this question ?

Besides the questions above i have one more (less important) question : Is there some kind of distribution which describes this case, given $(p, n)$ and how to simulate a process like this in general. I am using numpy and python.

2

There are 2 best solutions below

1
On

You need a random variable for the number $Y$ of missed trains in $n$ trips. Then the usual notations, and correct computations, would be $$P(Y \ge 1) = 1- P(Y = 0) = 1-(1-p)^n, \\P(Y = 1) = {n \choose 1}p^1(1-p)^{n-1}= np(1-p)^{n-1},$$ and so on.

0
On

If $X_i$ are indicators of missing the train on each occasion, you could say $$\mathbb P\left(\sum_{i=1}^n X_i \ge 1\right) = 1-(1-p)^n$$ for the probability of missing at least once, and $$\mathbb P\left(\sum_{i=1}^n X_i = 1\right) = np(1-p)^{n-1}$$ for the probability of missing exactly once

As BruceET says, this might look simpler if you define $Y=\sum\limits_{i=1}^n X_i$, in which case $Y$ has a binomial distribution with parameters $n$ and $p$