Artificial intelligent assistant

Question to calculating probability The question: **79%** of the drivers in a city always fasten their seatbelt when driving, and everyday some drivers receive a ticket(for various reasons...). If a driver has fastened their seatbelt there is a chance of **7%** that the driver receives a ticket. If a driver does not fasten their seatbelt there is a **22%** chance that he will receive a ticket. If a driver receives a ticket what is the probability that he had fastened his seatbelt? My assumption is that 7/29 of the people who receive a ticket had fastened their seatbelt and 22/29 did not. So I just calculated (7/29) * (0,79) + (22/29) * (0,21) and I got 0.35 but that seems to be wrong.

Let $S$ and $T$ be the events "seatbelt fasten" and "receive ticket" respectively.

* $P(S) = 0.79$
* $P(T \mid S) = 0.07$
* $P(T \mid S^C) = 0.22$



Use Bayes' formula to find $P(S \mid T)$.

\begin{align} P(S \mid T) &= \frac{P(S \cap T)}{P(T)} \\\ &= \frac{P(T \mid S) P(S)}{P(T \mid S) P(S)+P(T \mid S^C) P(S^C)} \\\ &= \frac{0.07 \cdot 0.79}{0.07 \cdot 0.79 + 0.22 \cdot (1 - 0.79)} \\\ &= \frac{79}{145} \end{align}

If a driver receives a ticket what is the probability that he had fastened his seatbelt is $79/145$.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 1115828e09a630fce7a5909870ffa17c