Question

In: Statistics and Probability

Provide plots of the χ2(r) distributions (pdf) for values of r = 1,2,5,10,20.

Provide plots of the χ2(r) distributions (pdf) for values of r = 1,2,5,10,20.

Solutions

Expert Solution

par(mfrow=c(3,2))
x <- rchisq(100, 1)
hist(x, prob=TRUE)
curve( dchisq(x, df=1), col='green', add=TRUE)
x <- rchisq(100, 2)
hist(x, prob=TRUE)
curve( dchisq(x, df=2), col='red', add=TRUE )
x <- rchisq(100, 5)
hist(x, prob=TRUE)
curve( dchisq(x, df=5), col='orange', add=TRUE )
x <- rchisq(100, 10)
hist(x, prob=TRUE)
curve( dchisq(x, df=10), col='black', add=TRUE )
x <- rchisq(100, 20)
hist(x, prob=TRUE)
curve( dchisq(x, df=20), col='blue', add=TRUE )

For single plot

x <- rchisq(100, 1)
hist(x, prob=TRUE ,xlim=c(0,10))
curve( dchisq(x, df=1), col='green', add=TRUE)
x <- rchisq(100, 2)
curve( dchisq(x, df=2), col='red', add=TRUE )
x <- rchisq(100, 5)
curve( dchisq(x, df=5), col='orange', add=TRUE )
x <- rchisq(100, 10)
curve( dchisq(x, df=10), col='black', add=TRUE )
x <- rchisq(100, 20)
curve( dchisq(x, df=20), col='blue', add=TRUE )


Related Solutions

Define the probability density functions (PDF): Binomial, Uniform, and Normal distributions. Provide one example of each...
Define the probability density functions (PDF): Binomial, Uniform, and Normal distributions. Provide one example of each of them, and their graphs.
When performing a χ2 test for independence in a contingency table with r rows and c​...
When performing a χ2 test for independence in a contingency table with r rows and c​ columns, determine the​ upper-tail critical value of the test statistic in each of the following circumstances. a. α=​0.05, r=6​, c=5 d. α=​0.01, r=5​, c=6 b. α=​0.01, r=3​, c=4 e. α=​0.01, r=4​, c=5 c. α=​0.01, r=3​, c=6 a. The critical value is ____. ​(Round to three decimal places as​ needed.) b. The critical value is _____. ​(Round to three decimal places as​ needed.) c. The...
Can someone show me the R code to accomplish this? In R, Construct scatter plots of...
Can someone show me the R code to accomplish this? In R, Construct scatter plots of y versus x, y versus ln(x), ln(y) versus ln(x) and 1/y versus 1/x. Include your R code in a separate file. The article “Reduction in Soluble Protein and Chlorophyll Contents in a Few Plants as Indicators of Automobile Exhaust Pollution” (Intl. J. of Environ. Studies, 1983: 239-244) reported the accompanying data on x distance from a highway (meters) and y lead content of soil...
(i) Find the marginal probability distributions for the random variables X1 and X2 with joint pdf...
(i) Find the marginal probability distributions for the random variables X1 and X2 with joint pdf                     f(x1, x2) = 12x1x2(1-x2) , 0 < x1 <1   0 < x2 < 1 , otherwise             (ii) Calculate E(X1) and E(X2)     (iii) Are the variables X1 ­and X2 stochastically independent? (iv) Given the variables in the question, find the conditional p.d.f. of X1 given 0<x2< ½ and the conditional expectation E[X1|0<x2< ½ ].
Use a computer to make two plots of the Boltzmann, Fermi-Dirac, and Bose-Einstein distributions functions versus...
Use a computer to make two plots of the Boltzmann, Fermi-Dirac, and Bose-Einstein distributions functions versus x=(LaTeX: \epsilon-\mu ϵ − μ )/kT. For one make both axes linear. For the other make the y-axis logarithmic, and indicate the x- and y- ranges where the distribution functions agree to better than one percent.
Explain with circuits and plots for the voltage and current relations in R, L, and C...
Explain with circuits and plots for the voltage and current relations in R, L, and C circuits separately? What is impendence? How resonance occurs in an AC circuit? Explain RLC series circuit? Write impedance? What is power in A.C circuit? Explain resonance in AC circuit with examples?
Use R to complete the following questions. You should include your R code, output and plots...
Use R to complete the following questions. You should include your R code, output and plots in your answer. 1. Two methods of generating a standard normal random variable are: a. Take the sum of 5 uniform (0,1) random numbers and scale to have mean 0 and standard deviation 1. (Use the properties of the uniform distribution to determine the required transformation). b. Generate a standard uniform and then apply inverse cdf function to obtain a normal random variate (Hint:...
Use R to complete the following questions. You should include your R code, output and plots...
Use R to complete the following questions. You should include your R code, output and plots in your answer. 1. Two methods of generating a standard normal random variable are: a. Take the sum of 5 uniform (0,1) random numbers and scale to have mean 0 and standard deviation 1. (Use the properties of the uniform distribution to determine the required transformation). b. Generate a standard uniform and then apply inverse cdf function to obtain a normal random variate (Hint:...
Use R to complete the following questions. You should include your R code, output and plots...
Use R to complete the following questions. You should include your R code, output and plots in your answer. Two methods of generating a standard normal random variable are: a. Take the sum of 5 uniform (0,1) random numbers and scale to have mean 0 and standard deviation 1. (Use the properties of the uniform distribution to determine the required transformation). b. Generate a standard uniform and then apply inverse cdf function to obtain a normal random variate (Hint: use...
. Consider Beta pdf and plot it on the same paper for various values of alpha...
. Consider Beta pdf and plot it on the same paper for various values of alpha and beta: alpha = 1,2,3,4,5 and beta=1/2, 1, 3/2, 2, 5/2. Considr all combinations. 2. Consider gamma pdf and plot it on the same paper for various values of alpha and beta: alpha = 1/2, 1, 3/2, 2, 5/2 and beta = 1, 2, 3, 4, 5. Consider all possible combinations. 3. Consider Normal pdf and plot it on the same apper for various...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT