Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I am trying to solve this problem in R. Would appreciate any hints or helps. A r

ID: 3126563 • Letter: I

Question

I am trying to solve this problem in R. Would appreciate any hints or helps.

A random variable Y has a log normal distribution, i.e log(Y) has a standard normal distribution. Do the following:

a) Fenerate a random sample of 750 points (assign xy).

b) Find mean(xy) and sd(xy).

c) A point of xy is said to be extreme when it’s more than 2.5 times the SD units away from mean. (Notice that the theoretical mean of y is exp(1/2) and the theoretical standard deviation of y is sqrt(exp(2)-exp(1))). Now, extract extreme points from xy (assign ab) and all non-extreme points (assign abc).

Explanation / Answer

a) Use

to generate 750 sample points with

number of observations. If length(n) > 1, the length is taken to be the number required.

mean and standard deviation of the distribution on the log scale with default values of 0 and 1 respectively.

b) mean(a)

gives the mean of the points

sd(a)

gives the standard deviation

> mean(xy)
[1] 1.646524
>
> sd(xy)
[1] 2.19058

m=mean(xy)
sd = sd(xy)

c)

ab = xy[which(xy>m+2.5*sd | xy < m-2.5*sd)]
abc = xy[which(xy<= m+2.5*sd & xy >= m-2.5*sd)]

This extracts extreme points to ab and non-extreme points to abc

n

number of observations. If length(n) > 1, the length is taken to be the number required.

meanlog, sdlog

mean and standard deviation of the distribution on the log scale with default values of 0 and 1 respectively.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote