Review probabilities

Probability
Statistics
Author

Rafiq Islam

Published

August 22, 2024

Post under construction

Introduction

In today’s world, getting placement in data science world is highly challenging and competitive. It requires a lot of things including but not limited to basic knowledge in statistics, probability, machine learning, deep learning, and computer science. Even sometimes we face some basic problems from statistics and probability that we probably have solve long ago but forgot due to lack of practice or it’s taking longer due to rusty memory. Because, in master’s and Ph.D’s we focus on a very narrow topic and get our experties on those topics. So, it’s not a shame or humiliation if we can’t do a very simple problem even though we are capable of solving thousand time harder problems than that. It’s normal.

Conditional Probabilities: Bayes’s Theorem

  1. Assume two coins, one fair (i.e. equal chance of getting head and tail if tossed) and the other one is unfair and always gets head if tossed. If a coin is chosen at random and tossed six times and you get heads in all six tosses, what is the probability that you are tossing the unfair one?
    Solution:
    Let,

    • \(F\) be the event the coin is fair, \(F'\) being the event of unfair coin and
    • \(H\) be the event showing up head.

    We neeed to find \(\mathbb{P}(F'|6H)\), the probability that we are tossing the unfair \(F'\) coins given that we got 6 heads.
    \[\begin{align} \mathbb{P}(F'|6H)&=\frac{\mathbb{P}(6H|F')\mathbb{P}(F')}{\mathbb{P}(6H)} \end{align}\]
    Here,

    • \(\mathbb{P}(F)=\mathbb{P}(F')=\frac{1}{2}\), the probability of chosing a fair or unfair coin
    • \(\mathbb{P}(6H|F)=\left(\frac{1}{2}\right)^6\), by the principle that flipping a fair coin 6 times are indpendent events, and thus the probability got multiplied
    • \(\mathbb{P}(6H|F')=1\), sure event, since unfair coin.

    So, the total probability, \[\mathbb{P}(6H)=\mathbb{P}(6H|F)\mathbb{P}(F)+\mathbb{P}(6H|F')\mathbb{P}(F')=\left(\frac{1}{2}\right)^6\frac{1}{2}+1\cdot \frac{1}{2}\]
    Therefore,
    \[\mathbb{P}(F'|6H)=\frac{\mathbb{P}(6H|F')\mathbb{P}(F')}{\mathbb{P}(6H)}=\frac{1\cdot\frac{1}{2}}{\left(\frac{1}{2}\right)^6\frac{1}{2}+1\cdot \frac{1}{2}}\]

  2. One in thousand people

Share on

You may also like

Back to top

Citation

BibTeX citation:
@online{islam2024,
  author = {Islam, Rafiq},
  title = {Review Probabilities},
  date = {2024-08-22},
  url = {https://mrislambd.github.io/jobandintern/probability/},
  langid = {en}
}
For attribution, please cite this work as:
Islam, Rafiq. 2024. “Review Probabilities.” August 22, 2024. https://mrislambd.github.io/jobandintern/probability/.