# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: Python 3
#     language: python
#     name: python3
# ---

# # 1.You flip a fair coin 10 times. What is the probability of getting 8 or more heads? 



# # 2. The probability that you will win a certain game is 0.3. You play the game 20 times. What is the mean of this binomial distribution?
#



# # 3. An automatic camera records the number of cars running a red light at an intersection (that is, the cars were going through when the red light was against the car). Analysis of the data shows that on average 15% of light changes record a car running a red light. Assume that the data has a binomial distribution. What is theprobability that in 20 light changes there will be exactly three (3) cars running a red light?



# # 4. There are 15 sets of traffic lights on the journey.The probability that a driver must stop at any one traffic light coming to alliance University is 0.3  
#
# a) What is the probability that a student must stop at exactly 2 of the 15 sets oftraffic lights? 
#
# b) What is the probability that a student will be stopped at 1 or more of the 15sets of traffic lights? 



# # 5. What is the area under the curve of a probability distribution? Explain.



# # 6. My Bank has a large Credit Card portfolio. Based on empirical data, they have found that 60% of the customers pay their bill on time. If a sample of 10 accounts is selected from the current database, construct the Probability Distribution of accounts paying on time.
# Hint: Make use of Function used in Excel or R



# # 7. If the likelihood of a tagged order form is 0.1, What is the probability that there are three tagged order forms in the sample of four?
# Hint: Use Binomial distribution equation



# # 8. Determine the following:
# a) For n = 4 and Mu = 0.12, what is P(X = 0)?
#
# b) For n = 6 and Mu = 0.83, what is P(X = 5)?



# # 9.Determine the mean and standard deviation of the variable X in each of the following binomial distributions:
# a) n = 4 and Mu = 0.10
#
# b) n = 5 and Mu = 0.80



# # 10. Assume a poisson distribution with lambda = 5.0. What is the probability that
# a) X <= 1?
#
# b) X > 1?



# # 11. The number of work related injuries per month in a manufacturing plant is known to follow a Poisson distribution, with a mean of 2.5 work-related injuries a month.
#
# a) What is the probability that in a given month, no work-related injuries occur?
#
# b) That at least one work- related injury occurs?
#
# Hint: Use Poisson distribution equation, find X = 0, Given lambda = 2.5



# # 12. A 5-litre bucket of water is taken from a swamp. The water contains 75 mosquito larvae. A 200mL flask of water is taken form the bucket for further analysis. What is
#
# a) the expected number of larvae in the flask?
#
# b) the probability that the flask contains at least one mosquito lava?



# # 13. Why the need of Standardization? Why do we us Z instead of “the Number of Standard Deviations”?



# # 14. A radar unit is used to measure speeds of cars on a Mumbai – Pune Highway. The speeds are normally distributed with a mean of 70 km/hr and a standard deviation of 10 km/hr.
#
# a)What is the probability that a car picked at random is travelling at more than 100 km/hr?
#
# b)What is the probability that the car speed is between 80 Km / hr and 100 Km / hr
#
# Hint: You can make use of Excel



# # Binomial distribution
#
# It is widely used probability distribution of a discrete random variable.
#
# Plays major role in quality control and quality assurance function.
#
# P(X=x∣n,π)P(X=x∣n,π) = n!x!(n−x)!πx(1−π)n−xn!x!(n−x)!πx(1−π)n−x
# where P(X = x) is the probability of getting x successes in n trials and ππ is the probability of an event of interest
#
# Some important functions in Python for Binomial distribution:
# 1) Probability mass function
# scipy.stats.binom.pmf gives the probability mass function for the binomial distribution
# binomial = scipy.stats.binom.pmf (k,n,p),
#
# where k is an array and takes values in {0, 1,..., n}
# n and p are shape parameters for the binomial distribution
# The output, binomial, gives probability of binomial distribution function in terms of array.
#
# 2) Cumulative Density function
# cumbinomial = scipy.stats.binom.cdf(k,n,p) gives cumulative binomial distribution.
#
# The output, cumbinomial, gives cumulative probability of binomial distribution function in terms of array.
#
# 3) Plot the binomial Density function
# The function, matplotlib.pyplot.plot(k, binomial, ‘o-’) gives us plot of the binomial distribution function.

# # 15. The percentage of orders filled correctly at Wendy's was approximately 86.8%. Suppose that you go to drive-through window at Wendy's and place an order. Two friends of yours independently place orders at the drive-through window at the same Wendy's.
#
# What are the probabilities that
#
# a) all three
#
# b) none of the three
#
# c) atleast two of the three orders will be filled correctly?
#
# d) what is the mean and standard deviation of the orders filled correctly?



StarcoderdataJupyterScriptsDedupFiltered