''' Aim : The probability that it is Friday and that a student is absent is 3 %. Since there are 5 school days in a week, the probability that it is Friday is 20 %. What is the probability that a student is absent given that today is Friday? Apply Baye’s rule in python to get the result.
=================================
Explanation:
=================================
F : Friday
A : Absent
Based on the given problem statement,
The probability that it is Friday and that a student is absent is 3%
i.e
P(A ∩ F)= 3% = 3 / 100 = 0.03
and
The probability that it is Friday is 20%
i.e
P(F)=20% = 20/100 = 0.2
Then,
The probability that a student is absent given that today is Friday
P(A ∣ F)
By the definition of Baye's rule( conditional probability ), we have
P(A ∣ F) = P(A ∩ F) / P(F)
===============================
Source Code :
===============================
'''
# The probability that it is Friday and that a student is absent is 3%
pAF=0.03
print("The probability that it is Friday and that a student is absent :",pAF)
# The probability that it is Friday is 20%
pF=0.2
print("The probability that it is Friday : ",pF)
# The probability that a student is absent given that today is Friday
pResult=(pAF/pF)
# Display the Result
print("The probability that a student is absent given that today is Friday : ",pResult * 100,"%")1) The probability that it is Friday and that a student is absent is 3%. Since there are 5 school days in a week, the probability that it is Friday is 20%. What is theprobability that a student is absent given that today is Friday? Apply Baye’s rule in python to get the result.(Ans: 15%) View Solution
2) Extract the data from database using python View Solution
3) Implement k-nearest neighbours classification using python View Solution
4) Given the following data, which specify classifications for nine ombinations of VAR1 and VAR2 predict a classification for a case where VAR1=0.906 and VAR2=0.606, using the result of k-means clustering with 3 means (i.e., 3 centroids) View Solution
5) The following training examples map descriptions of individuals onto high, medium and low credit-worthiness.Input attributes are (from left to right) income, recreation, job, status, age-group, home-owner. Find the unconditional probability of 'golf' and the conditional probability of 'single' given 'medRisk' in the dataset View Solution
6) Implement linear regression using python View Solution
7) Implement naive baye's theorem to classify the English text View Solution
8) Implement an algorithm to demonstrate the significance of genetic algorithm View Solution
9) Implement the finite words classification system using Back-propagation algorithm View Solution