1. Homepage
2. Programming
3. IEMS 303: Statistics: Kumaraswamy distribution

# IEMS 303: Statistics: Kumaraswamy distribution

USNorthwestern UniversityIEMS 303StatisticsKumaraswamy distribution

IEMS 303 Homework 2

For the exercises below turn in a single RScript file. Use comments to indicate each exercise or part of exercise; see the example below. Make sure results are clearly labeled. For grading we will execute the file.

# Solution to Exercise 17, Part (z) set.seed(1)
X <- rnorm(100)
hist(X)

Background

The Kumaraswamy distribution is useful for modeling random outcomes on the interval (0,1), such as the fraction of borrowers who default on their loans. Unfortunately it is not in R. It has two parameters a > 0 and b > 0, and has density, cdf and quantile functions

The lognormal distribution (literally, the natural log of the data are normally distributed) is widely used to model financial returns. It is in R as [d,p,q,r]lnorm. Look at the help page for this distribution. R has chosen to parameterize it using meanlog and sdlog, which are not the mean and standard deviation. However, for this assignment just use the parameters we provide, which are meanlog = 4.598022 and sdlog = 0.1195713. These values give an actual mean and standard deviation of 100 and 12, respectively.

Exercise 1

Use R to compute the following quantities

Exercise 1(a)

Suppose that X has a negative binomial distribution with desired number of successes size = 3 and success probability prob = 0.37. Compute Pr{X = 10} and Pr{X 10}. Reminder: The negative binomial distribution is the distribution of the number of trials until size successes are achieved.

Exercise 1(b)

Suppose X has a normal distribution the mean 6 and standard deviation 3. Compute Pr{−2 X 7} and the 0.85 quantile of this distribution (that is, the value x0.85 such that Pr{X x0.85} = 0.85).

Exercise 1(c)

Suppose X has a Student t distribution with 17 degrees of freedom. Compute the Pr{X > 1.645}.

Exercise 2

Exercise 2(a)

Plot on the same graph the densities of the Kumaraswamy distribution for parameters (a,b) = (1, 1), (2, 1.5), (4, 2), using at least 100 values of x. Hint: plot the last set of parameters first.

Exercise 2(b)

For the set of parameters (a, b) = (2, 1.5), generate 10,000 random values from this distribution and plot a histogram to see if it is similar to your density. Use set.seed(12345). Be sure to save the 10,000 values you generated for the next part of the exercise.

Exercise 2(c)

Using the data you generated in 1(b), estimate the Pr{X > 0.5} and E[X|X > 0.5] (the mean (average) value of this random variable, given that the value is larger than 0.5).

Exercise 3

In finance the “value at risk” (VaR) is the 5th percentile (0.05 quantile) of the investment return distribution. Suppose our investment costs \$90 and its value after one year is described by a random variable X with lognormal distribution having mean \$100 and standard deviation \$12 (thus the return is X 90 and the expected value of return is \$100 - \$90 = \$10).

Exercise 3(a)

Compute the VaR from this investment. Do not use simulation. Hint: The 5th percentile of the return is the 5th percentile of the value minus the cost. Note: even though the 5th percentile of return is typically negative, the VaR is often reported as positive. Here we will just leave it negative.

Exercise 3(b)

Many financial engineers prefer the conditional value at risk (CVaR), which is expected value of (average) return, given the return is less than or equal to the VaR. Use simulation with 10,000 replications to estimate the CVaR for this investment. Use set.seed(12345). Hint: You need to simulate 10,000 returns, and use the VaR computed from the previous exercise.

Exercise 4

The Mega-Millions multi-state lottery selects five numbers from the set {1, 2, . . . , 70} without replacement, and one number from the set {1, 2, . . . , 25} (the “mega-ball”). The lottery uses a physical device (numbered balls in a basket) to select the numbers, but it could also be done by using simulation. Use R to generate three random lottery selections (five numbers from the first group, one from the last). Use set.seed(12345) before you start.

## Get Expert Help On This Assignment

#### Scan above qrcode with Wechat

US代写,Northwestern University代写,IEMS 303代写,Statistics代写,Kumaraswamy distribution代写,US代编,Northwestern University代编,IEMS 303代编,Statistics代编,Kumaraswamy distribution代编,US代考,Northwestern University代考,IEMS 303代考,Statistics代考,Kumaraswamy distribution代考,UShelp,Northwestern Universityhelp,IEMS 303help,Statisticshelp,Kumaraswamy distributionhelp,US作业代写,Northwestern University作业代写,IEMS 303作业代写,Statistics作业代写,Kumaraswamy distribution作业代写,US编程代写,Northwestern University编程代写,IEMS 303编程代写,Statistics编程代写,Kumaraswamy distribution编程代写,USprogramming help,Northwestern Universityprogramming help,IEMS 303programming help,Statisticsprogramming help,Kumaraswamy distributionprogramming help,USassignment help,Northwestern Universityassignment help,IEMS 303assignment help,Statisticsassignment help,Kumaraswamy distributionassignment help,USsolution,Northwestern Universitysolution,IEMS 303solution,Statisticssolution,Kumaraswamy distributionsolution,