Question: Using python In this homework you are supposed to use the random number generater random.random_sample from the numpy package to generate random numbers with three

Using python  Using python In this homework you are supposed to use the

In this homework you are supposed to use the random number generater random.random_sample from the numpy package to generate random numbers with three different distributions. Recall from the lecture that if F : R [0, 1] is a distribution function with generalized inverse F-1. [0,1] R and U is a uniform random variable, then F- (U) is a random variable with distribution function F Using the function random.random sample from numpy package write three functions: e exponentialRV(seed, mean,n) that returns for given seed a bunch of n random variables from an exponential distribution with the provided mean. Derive the generalized inverse distribution function analytically for your simulation. poissonRV(seed, mean,n) that returns for given seed a bunch of n Poisson distributed random numbers with the provided mean. You have to numerically calculate the inverse distribution function. e funnyDiceRV(seed,n) that returns for given seed a bunch of n random number which describe a biased die with distribution P(1]P(12]) P(3]) P(I4]) P(5)) 1/10 and P(6]) 12

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!