3. PROBABILITY
• Probability is branch of mathematics which deals with calculating the chances of
the given event`s occurrence, which is expressed as a number between 0 and 1.
• Fore example: if we toss a coin. The probability of tossed coin is either “head” or
“tail” because there are no other option of occurrence.
• If weather is cloudy we guess that it will rain or not.
•
4. DEFINITION OF PROBABILITY
• If a random experiment can produce `n` total numbers of possible outcomes and if
`m` is considered number of favorable outcomes to occurrence of a certain event A,
then the probability of event A, denoted by p(A), is defined as ratio m/n.
symbolically, we write
• P(A) =m/n= Number of favorable outcomes /total Number of possible outcomes.
• This definition was formulated by French mathematician P.S Laplace(1749-1827)
5. TERMS USED IN PROBABILITY
• Event: an event is individual outcome of an experiment.
• Outcome: An outcome is the result of an event.
• Sample space: collection of all possible outcomes.
6. NUMERICAL EXAMPLE
• A fair coin is tossed three times. What is the probability that at least one head
appears.?
• Solution:
• The sample space for this experiment is
• S ={HHH,HHT,HTH,THH,HTT,THT,TTH,TTT} and thus n(S)=8
• Let A denote the event that at least one head appears. Then
• A={HHH,HHT,HTH,THH,HTT,THT,TTH} so n(A)=7
• Hence p(A)=7/8
7. BAYES' THEOREM
• Definition: Bayes' theorem is a mathematical equation used in probability and
statistics to calculate conditional probability. In other words, it is used to calculate
the probability of an event based on its association with another event. The theorem
is also known as Bayesian law or Bayesian rule.
• First it was derived by English minister and statistician reverend Thomas Baye in
(1763)
• Later in (1774) French mathematician Laplace development in it.
8. FORMULA
• There are several different ways to write this theorem. But common way is :
• P(A|B)=P(B|A).P(A)/P(B)
• where A and B are two events and P(B) ≠ 0
• P(A ∣ B) is the conditional probability of event A occurring given that B is true.
• P(B ∣ A) is the conditional probability of event B occurring given that A is true.
• P(A) and P(B) are the probabilities of A and B occurring associate of one another.
9. CONT`D
• Bayes' Theorem allows you to update predicted probabilities of an event
• Many modern machine learning techniques rely on Bayes' theorem. For instance,
spam filters use Bayesian updating to determine whether an email is real or spam,
given the words in the email.
• Additionally, many specific techniques in statistics, such as calculating interpreting
medical results, are best described in terms of how they contribute to updating
hypotheses using Bayes' theorem.
10. EXAMPLE
• For example, consider a drug test that is 99 percent sensitive and 99 percent specific. If half a percent (0.5 percent) of
people use a drug, what is the probability a random person with a positive test actually is a user?
• P(A ∣ B) = P(B ∣ A)P(A) / P(B)
• maybe rewritten as:
• P(user ∣ +) = P(+ ∣ user)P(user) / P(+)
• P(user ∣ +) = P(+ ∣ user)P(user) / [P(+ ∣ user)P(user) + P(+ ∣ non-user)P(non-user)]
• P(user ∣ +) = (0.99 * 0.005) / (0.99 * 0.005+0.01 * 0.995)
• P(user ∣ +) ≈ 33.2%
• Only about 33 percent of the time would a random person with a positive test actually be a drug user. The conclusion is
that even if a person tests positive for a drug, it is more likely they do not use the drug than that they do. In other words,
the number of false positives is greater than the number of true positives
11.
12.
13.
14.
15. CONDITIONAL PROBABILITY
• Conditional probability is used where we have condition
• In probability theory, conditional probability is a measure of the probability of
an event given that another event has occurred.
• P(A|B)=P(A^B)/P(B)
16. EXAMPLE
• If tossing two coins. What is the probability is
• getting 2 heads
• Given that
• at least 1 head
• Solution:
• S={HH,HT,TH,TT}
• Let A be the event having 2 head
• n(A)=1
17. CONT`D
• P(A)=1/4
• B be the event at least 1 head
• n(B)=3
• P(A)=3/4
• n(A^B)=1/4 then
• P(A|B)=P(A^B)/P(B)
• P(A|B)=1/4/3/4
• P(A|B)=1/3