Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Done in python! 1. Experimental Bernoulli Trials Consider the following experiment: You roll three fair dice n=1000 times. This is considered one experiment, or one

Done in python!

1. Experimental Bernoulli Trials Consider the following experiment: You roll three fair dice n=1000 times. This is considered one experiment, or one Bernoulli Trial. If you get "three sixes" in a roll, it is considered "success". The number of successes in n rolls, will be your random variable "X". The goal is to create the probability mass function plot of "X". In order to generate the histogram repeat the experiment N=10,000 times, and record the values of "X" each time, i.e. the number of "successes" in n rolls. Create the experimental Probability Mass Function plot, using the histogram of "X" as you did in previous projects. SUBMIT the PMF plot and your code in a Word file. Use 16 bins to plot the results. All plots should be properly labeled. See Figure 1 for an example. Note: Do not replicate the scroll in Figure 1. The scroll is used in the figure in order to hide the graph data.

2. Calculations using the Binomial Distribution In this problem you will use the theoretical formula for the Binomial distribution to calculate the probability p of success in a single roll of the three dice. Success is defined as the number of three sixes in n = 1000 trials. Use the Binomial formula to generate the Probability Mass Function plot of the random variable X = {number of successes in n Bernoulli trials}. Compare the plot you obtain using the Binomial formula, to the plot you obtained from the experiments in Problem 1. SUBMIT the PMF plot and your code in a Word file. The graph should be plotted in the same scale as the graph in Problem 1 so that they can be compared.

3. Approximation of Binomial by Poisson Distribution Consider the case when the probability p of success in a Bernoulli trial is small and the number of trials n is large (in practice this means that n 50 and np 5). In that case you can use the Poisson distribution formula to approximate the probability of success in n trials, as an alternative to the Binomial formula. The parameter that is needed for the Poisson distribution is obtained from the equation = n p Use the parameter and the Poisson distribution formula to create a plot of the probability distribution function approximating the probability distribution of the random variable X = {number of successes in n Bernoulli trials}. Compare the plot you obtained from the Poisson formula to the plot you obtained from the experiments in Problem 1. SUBMIT the PMF plot and your code in a Word file. The graph should be plotted in the same scale as the graph in Problem 1, so that they can be compared.

I need just the python code in anaconda spyder and the pmf plot

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Seven NoSQL Databases In A Week Get Up And Running With The Fundamentals And Functionalities Of Seven Of The Most Popular NoSQL Databases

Authors: Aaron Ploetz ,Devram Kandhare ,Sudarshan Kadambi ,Xun Wu

1st Edition

1787288862, 978-1787288867

Students also viewed these Databases questions