Table of Contents

05 Probabilities I

Introduction / refresher of some probabilities concept + α,β exercise solution

Exercise for bonus points:

Exercise II / Solving together

Random variable, mean value

In certain board game, the dice are rolled in the following way:

What is the mean (expected) value of such a roll? Try to solve first theoretically and then by simulation.

Solution via theory

Instructions:

  1. First, define the space $\cal S$ of elementary events (outcomes of the experiment).
  2. Determine the probabilities of these elementary events. Are they all the same? What should their sum be? Is this condition met?
  3. Define the random variable (r.v.) $H$, i.e. determine what real value $H(s)$ is assigned to each elementary event $s \in \cal S$.
  4. What is the support of r.v. $H$? (that is, which real values will have a non-zero probability?)
  5. Define the probability distribution of r.v. $H$, i.e. determine the value of the function $p_H(x)$ for all values of $x$.
  6. Determine the expected value $E(H)$ of r.v. $H$.
Solution via simulation

Instructions:

  1. Create a function that will return a single value of $H$ according to the above rules.
  2. Find out the results of many such rolls and calculate their average.
  3. Try to run the script many times and observe differences in the estimated $E(X)$.

Probability and simulation

If you have time, try to solve other probability problems by simulation, e.g:

Exercise III / Solving together

Conditional probability, Bayes theorem

Although I don't have any symptoms yet, I'm worried about disease X. I'm considering getting tested for it, but haven't yet. I therefore want to study the following phenomena:

For the test I'm considering taking, the manufacturer says it has 90% accuracy for both healthy and sick people. The prevalence of disease X in the population is 5%. Try to answer the following questions:

  1. What is the probability that a person randomly selected from the population has disease X?
  2. What is the probability that I have disease X?
  3. How to understand (and denote) test information from the manufacturer?
  4. What is the probability that I have disease X if I test positive?
  5. What is the probability that I have disease X if I test negative?