Question

In: Statistics and Probability

1)Using R, construct one plot of the density function for a uniformly distributed continuous random variable...

1)Using R, construct one plot of the density function for a uniformly distributed continuous random variable defined between 0 and 6.

Make sure you include a main title, label both axis correctly and include a legend in your figure.

The main title needs to include your last name, also include your R code with your answer.

2) Using R, construct one plot of the density function for a Chi-square distributed random variable.

The plots should contain six lines corresponding to the following degrees of freedom1, 2, 3, 4, 6, 10.

Make sure you include a main title, label both axiscorrectlyand include a legend in your figure.

The main title needs to include your last name, also include your R code with your answer.

Solutions

Expert Solution

1) Let

R code for the plot is

#part 1) Uniform distribution
curve(dunif(x,0,6),from=0,to=6,main="Density of Uniform(0,6) distribution:Your name",ylab="Density")
legend("topright",c("Uniform(0,6)"),lty=1,col=1)

# get this

2) Chi-square distribution for , where df is the degrees of freedom

R code with a legend

#part 2)
#plot chisquare(1)
curve(dchisq(x,1),from=0,to=10,ylim=c(0,0.5),main="Density of Chi-Square distribution:Your name",ylab="Density")
#add other graphs to the same plot
for (df in c(2, 3, 4, 6, 10)) {
   curve(dchisq(x,df),from=0,to=10,add=TRUE,col=df,lty=df)
}
legend("topright",c(paste("df=",c(1,2, 3, 4, 6, 10))),col=c(1,2, 3, 4, 6, 10),lty=c(1,2, 3, 4, 6, 10))

# get this

all code together

----

#part 1) Uniform distribution
curve(dunif(x,0,6),from=0,to=6,main="Density of Uniform(0,6) distribution:Your name",ylab="Density")
legend("topright",c("Uniform(0,6)"),lty=1,col=1)

#part 2)
#plot chisquare(1)
curve(dchisq(x,1),from=0,to=10,ylim=c(0,0.5),main="Density of Chi-Square distribution:Your name",ylab="Density")
#add other graphs to the same plot
for (df in c(2, 3, 4, 6, 10)) {
   curve(dchisq(x,df),from=0,to=10,add=TRUE,col=df,lty=df)
}
legend("topright",c(paste("df=",c(1,2, 3, 4, 6, 10))),col=c(1,2, 3, 4, 6, 10),lty=c(1,2, 3, 4, 6, 10))

-----------------


Related Solutions

1) There is a continuous function from [1, 4] to R that is not uniformly continuous....
1) There is a continuous function from [1, 4] to R that is not uniformly continuous. True or False and justify your answer. 2) Suppose f : D : →R be a function that satisfies the following condition: There exists a real number C ≥ 0 such that |f(u) − f(v)| ≤ C|u − v| for all u, v ∈ D. Prove that f is uniformly continuous on D Definition of uniformly continuous: A function f: D→R is called uniformly...
For ? continuous random variable has ??(?) probability density function with ? e. Define ?(?)=?.... ??...
For ? continuous random variable has ??(?) probability density function with ? e. Define ?(?)=?.... ?? =(.,.) f. Obtain ? constant. g. Calculate the ?(?), ???(?) values. h. Define 5 probabilities and calculate them.
5. A continuous random variable X is uniformly distributed over (0,10). Compute the probability that an...
5. A continuous random variable X is uniformly distributed over (0,10). Compute the probability that an observed value of X will be within one standard deviation of its mean.
The probability density function of the continuous random variable X is given by fX (x) =...
The probability density function of the continuous random variable X is given by fX (x) = kx, (0 <= x <2) = k (4-x), (2 <= x <4) = 0, (otherwise) 1) Find the value of k 2)Find the mean of m 3)Find the Dispersion σ² 4)Find the value of Cumulative distribution function FX(x)
Let X and Y be independent continuous random variables, with each one uniformly distributed in the...
Let X and Y be independent continuous random variables, with each one uniformly distributed in the interval from 0 to1. Compute the probability of the following event. XY<=1/7
Consider a continuous random variable X with the probability density function f X ( x )...
Consider a continuous random variable X with the probability density function f X ( x ) = x/C , 3 ≤ x ≤ 7, zero elsewhere. Consider Y = g( X ) = 100/(x^2+1). Use cdf approach to find the cdf of Y, FY(y). Hint: F Y ( y ) = P( Y <y ) = P( g( X ) <y ) =
Let X be a continuous random variable with a probability density function fX (x) = 2xI...
Let X be a continuous random variable with a probability density function fX (x) = 2xI (0,1) (x) and let it be the function´ Y (x) = e −x a. Find the expression for the probability density function fY (y). b. Find the domain of the probability density function fY (y).
Assume that a continuous random variable has a following probability density function: f ( x )...
Assume that a continuous random variable has a following probability density function: f ( x ) = { 1 10 x 4 2 ≤ x ≤ 2.414 0 o t h e r w i s e Use this information and answer questions 3a to 3g. Question a: Which of the following is a valid cumulative density function for the defined region ( 2 ≤ x ≤ 2.414)?    A.F x ( x ) = 1 50 x 5 −...
Advanced Calculus 1 Problem 1 If the function f : D → R is uniformly continuous...
Advanced Calculus 1 Problem 1 If the function f : D → R is uniformly continuous and α is any number, show that the function αf : D → R also is uniformly continuous. Problem2 Provethatiff:D→Randg:D→Rareuniformlycontinuousthensois the sum f + g : D → R. Problem 3 Define f (x) = 2x + 1 for all x ∈ R. Prove that f is uniformly continuous. Problem 4 Define f (x) = x3 + 1 for all x ∈ R. Prove...
2 Consider the probability density function (p.d.f) of a continuous random variable X: f(x) = (...
2 Consider the probability density function (p.d.f) of a continuous random variable X: f(x) = ( k x3 , 0 < x < 1, 0, elsewhere, where k is a constant. (a) Find k. (b) Compute the cumulative distribution function F(x) of X. (c) Evaluate P(0.1 < X < 0.8). (d) Compute µX = E(X) and σX.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT