Question: Please do it in Python. Problem 4 - Inverse Transform Sampling (10 Points) Random sample for any distribution can be generated from a random sample

Please do it in Python. Problem 4 - Inverse Transform Sampling (10Please do it in Python.

Problem 4 - Inverse Transform Sampling (10 Points) Random sample for any distribution can be generated from a random sample from uniform distribution. This can be done using Inverse transform Sampling For example, suppose you want to create a sample of size n from a Kumaraswamy distribution. To obtain this sample: 1. Generate a sample of size n from Uniform[o,1]. 2. Identify the inverse of the CDF function of the distribution of your choice (this needs to be done manually and implemented). In our example, it is Kumaraswamy distribution. Call this function inversecDFKumaraswamy). Note that you are not allowed to use any routines from np.random package here. This function should take two arguments, first is the sample point, and the second is the distribution parameter value, 3. Apply the inverseCDFKumaraswamy() function on each of the n sample points that you generated in step 1. The n outputs will be the sample from your desired distribution. The Probability Density Function (PDF) of the Kumaraswamy distribution is The Cumulative Distribution Function (CDF) of the Kumaraswamy distribution is Using the above implementation, generate a sample of size 100 from a Kumaraswamy (-2, -5) distribution. Your output must include the mean, variance and distribution plot (a histogram) for the generated sample In : Enter your solution here Problem 4 - Inverse Transform Sampling (10 Points) Random sample for any distribution can be generated from a random sample from uniform distribution. This can be done using Inverse transform Sampling For example, suppose you want to create a sample of size n from a Kumaraswamy distribution. To obtain this sample: 1. Generate a sample of size n from Uniform[o,1]. 2. Identify the inverse of the CDF function of the distribution of your choice (this needs to be done manually and implemented). In our example, it is Kumaraswamy distribution. Call this function inversecDFKumaraswamy). Note that you are not allowed to use any routines from np.random package here. This function should take two arguments, first is the sample point, and the second is the distribution parameter value, 3. Apply the inverseCDFKumaraswamy() function on each of the n sample points that you generated in step 1. The n outputs will be the sample from your desired distribution. The Probability Density Function (PDF) of the Kumaraswamy distribution is The Cumulative Distribution Function (CDF) of the Kumaraswamy distribution is Using the above implementation, generate a sample of size 100 from a Kumaraswamy (-2, -5) distribution. Your output must include the mean, variance and distribution plot (a histogram) for the generated sample In : Enter your solution here

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!