Question

Suppose the winnings of gamblers at Las Vegas are normally distributed with mean \$670 and standard deviation \$38. item Generate 10000 random numbers using rnorm function. Show how this distribution would look like. Add in the plot the mean, median and 20\% trimmed mean (provide these values). Solve using R studio.

Answer #1

Let we have the winnings of gamblers at Las Vegas are normally distributed with mean $670 and standard deviation $38.

#####

mu<-670

sigma<-38

### Generate 10000 random numbers from given normal distibution
i.e N(670,38)

x<-rnorm(10000,670,38)

## Plot histogram for checking distribution of generated data

mean<-mean(x)

669.7082

median<-median(x)

669.4677

trim_mean<-mean(x,trim=0.2)

669.6669

hist(x,xlab = "Class",ylab = "Frequency",main = "Histogram of
X",col="chocolate3")

## ad mean on histogram

abline(v = mean,

col = "royalblue",

lwd = 2)

## ad median on histogram

abline(v = median,

col = "red",

lwd = 2)

## ad trimed mean on histogram

abline(v = trim_mean,

col = "yellow",

lwd = 2)

Suppose the winnings of gamblers at Las Vegas are normally
distributed with mean \$670 and standard deviation \$38. Generate
10000 random numbers using rnorm function. Show how this
distribution would look like. Add in the plot the mean, median and
20\% trimmed mean (provide these values). In the previous problem,
how much someone has to win to be in the top 5%? Solve using R
studio.

(1) Generate 80 normally distributed random variables with the
mean 30 and the standard deviation 8, and store them in the vector
‘rand.vec. Then plot their empirical distribution function. (2)
Given a normal distribution with the mean 30 and the standard
deviation 8, find the two values of x that contain the middle 70%
of the normal curve area. (3) Calculate the probability for 2.5
< X < 10 in a Poisson distribution with the mean 6
use in R...

Suppose that the return of stock A is normally distributed with
mean 4% and standard deviation 5%, the return of stock B is
normally distributed with mean 8% and standard deviation 10%, and
the covariance between the returns of stock A and stock B is
−30(%)2 . Now you have an endowment of 1 dollar, and you
decide to invest w dollar in stock A and
1 − w dollar in stock B. Let rp
be the overall return of...

Question (2) [5 marks] (Use R) Suppose you have a company
producing cupcakes. Each cupcake is supposed to contain 10 grams of
sugar. The cupcakes are produced by a machine that adds the sugar
in a bowl before mixing everything. You believe the machine does
not add 10 grams of sugar for each cupcake. If your assumption is
true, the machine needs to be fixed. You stored the level of sugar
of thirty cupcakes. Note: You can create a randomized...

ADVERTISEMENT

Get Answers For Free

Most questions answered within 1 hours.

ADVERTISEMENT

asked 2 minutes ago

asked 12 minutes ago

asked 15 minutes ago

asked 40 minutes ago

asked 43 minutes ago

asked 46 minutes ago

asked 53 minutes ago

asked 54 minutes ago

asked 54 minutes ago

asked 1 hour ago

asked 1 hour ago

asked 1 hour ago