Skip to content

parmisnaddaf/LP_inductive_learning

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

80 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PDF --Q1 [Python]-- The probability of rain on a given calendar day in Vancouver is p[i], where i is the day's index. For example, p[0] is the probability of rain on January 1 , and p[10] is the probability of precipitation on January 11 . Assume the year has 365 days (i.e. p has 365 elements). What is the chance it rains more than n (e.g. 100) days in Vancouver? Write a function that accepts p (probabilities of rain on a given calendar day) and n as input arguments and returns the possibility of raining at least n days. ANSWER. if we want 365>=n>= 100 days to be rainy, we have to choose n days from the 365 days to be rainy. The other (365 -n ) days are going to be not rainy or (1-p[i]). We then multiply all these probabilities together. We repeat this step for all the values of 365>=n>= 100 and all the combinations of choosing n from 365 and add them all together:

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published