a)
Program screenhot of probability density function:
Sample output screenshot:
Code to copy:
set.seed(42)
# Calculate comulative distribution function
ecdf1 <- ecdf(rnorm(100)*0.5)
ecdf2 <- ecdf(rnorm(100)*1.0)
ecdf3 <- ecdf(rnorm(100)*2.0)
ecdf4 <- ecdf(rnorm(100)*3.0)
ecdf5 <- ecdf(rnorm(100)*4.0)
#attr(ecdf3,"call") <- "Cumulative Distribution Function"
plot(ecdf3, verticals=TRUE, do.points=FALSE, col='green')
plot(ecdf2, verticals=TRUE, do.points=FALSE, add=TRUE)
plot(ecdf1, verticals=TRUE, do.points=FALSE, add=TRUE, col='blue')
plot(ecdf5, verticals=TRUE, do.points=FALSE, add=TRUE, col='pink')
plot(ecdf4, verticals=TRUE, do.points=FALSE, add=TRUE, col='red')
b)
Program screenshot of comulative distribution function:
Sample output screenshot:
Code to copy:
set.seed(4000)
xseq<-seq(-8,10,.1)
par(mfrow=c(1,1), mar=c(3,4,4,3))
# Calculate probality density values
value1<-dnorm(xseq, 0,0.5)
value2<-dnorm(xseq, 0,1.0)
value3<-dnorm(xseq, 0,2.0)
value4<-dnorm(xseq, 0,3.0)
value5<-dnorm(xseq, 0,4.0)
# Display values in a grap using plot method
plot(xseq, value1, col="blue",xlab="", ylab="Density",main="Probability Density Fucntion is dnorm()" ,type="l",lwd=2, cex=2,cex.axis=.8)
# The method lines() is used ot attach the lines in a grap
lines(xseq, value2, col="black",xlab="", ylab="Density", type="l",lwd=2, cex=2,cex.axis=.8)
lines(xseq, value3, col="green",xlab="", ylab="Density", type="l",lwd=2, cex=2,cex.axis=.8)
lines(xseq, value4, col="red",xlab="", ylab="Density", type="l",lwd=2, cex=2,cex.axis=.8)
lines(xseq, value5, col="purple",xlab="", ylab="Density", type="l",lwd=2, cex=2,cex.axis=.8)
Do the following in the program R Suppose a random variable X follows the Rayleigh distribution...
Please answer from a-d Problem 2. Let X be a random variable with one of the following cumulative distribution function. 1.2 1,2 1.0 1.0 0.8 0.8 0.6 0.6 0.4 0.4 0.2 0.2 0.0 0.0 -1.0 -0.5 0.0 0.5 1.0 1.5 2,0 -1.0 -0.5 0.0 0.5 1.0 1.5 2.0 X X Pick the correct cumulative distribution function plot and answer questions: Page 2 of 9 Write down the probability mass function and What is the PMF of X? A. Poisson (3...
math 4. Let X be a random variable with the following cumulative distribution function (CDF): y <0 F(y) (a) What's P(X 2)? b) What's P(X > 2)? c) What's P(0.5<X 2.5)? (d) What's P(X 1)? (e) Let q be a number such that F()-0.6. What's q?
The probability density function for a continuous “Rayleigh” random variable X is given by fX(x)=α²xe−α²x²/2, x>0, 0 otherwise. Find the cumulative distribution of X.
Please answer from b-d as priority! Problem 2. Let X be a random variable with one of the following cumulative distribution function. 1.2 1.2 1.0 1.0 0.8 0.8 0.6 0.6 0.4 F 0.4 0.2 0.2 0.0 0.0 -1.0 -0.5 -1.0 -0.5 0.0 0.5 1.0 1.5 2.0 0.0 0.5 1.0 1.5 2.0 X Pick the correct cumulative distribution function plot and answer questions: Page 2 of 9 (3 pts) Write down the probability mass function and What is the PMF of...
Question 1 A continuous random variable X which represents the amount of sugar (in kg) used by a family per week, has the probability density function c(x-1(2-xsxs2 ; otherwise f(x) (i) Determine the value of c ii) Obtain cumulative distribution function (iii) Find P(X<1.2). Question 2 Consider the following cumulative distribution function for X 0.3 0.6 0.8 0.9 1.0 (i) Determine the probability distribution. ii) Find P(X<1). iii Find P(O <Xs5). Consider the following pdf ,f(x) = 2k ; 1<x<2...
Exercise 3.37. Suppose random variable X has a cumulative distribution function F(x) = 1+r) 720 x < 0. (a) Find the probability density function of X. (b) Calculate P{2 < X <3}. (c) Calculate E[(1 + x){e-2X].
IS 3x+1 # 6 Given that f(x) = is a probability distribution for a random variable that can take on the values x = 1,2,3,4,5, find an expression for the cumulative distribution function F(x) of the random variable. 50
Problem 6. Consider a random variable X whose cumulative distribution function (cdf) is given by 0 0.1 0.4 0.5 0.5 + q if -2 f 0 r< 2.2 if 2.2<a<3 If 3 < x < 4 We are also told that P(X > 3) = 0.1. (a) What is q? (b) Compute P(X2 -2> 2) (c) What is p(0)? What is p(1)? What is p(P(X S0)? (Here, p(.) denotes the probability mass function (pmf) for X) (d) Sketch a plot...
3x+1 # 6 Given that f(x) is a probability distribution for a random variable that can take on 50 the values x = 1,2,3,4,5, find an expression for the cumulative distribution function F(x) of the random variable. 15
Let X be a random variable with the following cumulative distribution function (CDF): y<0 (a) What's P(X < 2)? (b) What's P(X > 2)? c)What's P(0.5 X < 2.5)? (d) What's P(X 1)? (e) Let q be a number such that F(0.6. What's q?