Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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 image text in transcribed
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

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

Database Design Application Development And Administration

Authors: Mannino Michael

5th Edition

0983332401, 978-0983332404

More Books

Students also viewed these Databases questions