Question

In: Statistics and Probability

a. Generate samples of size 25, 50, 100 from a normal distribution. Construct probability plots. Do...

a. Generate samples of size 25, 50, 100 from a normal distribution. Construct probability plots. Do this several times to get an idea of how probability plots behave when the underlying distribution is really normal.

b. Repeat part (a) for a chi-square distribution with 10 df

I am required to use the R statistical program and I do not understand how to use it to solve this problem. If you could please show me the R Stats needed to solve this in the program I would highly appreciate it. Thank you and stay safe!

Solutions

Expert Solution

The R code is

#For Normal

set.seed(9999)
par(mfrow =c(1, 3))# for multiple plotting
#Sample Size 25
X.25=rnorm(n=25)
qqnorm(X.25)
qqline(X.25)
#Sample Size 50
X.50=rnorm(n=50)
qqnorm(X.50)
qqline(X.50)
#Sample Size 100
X.100=rnorm(n=100)
qqnorm(X.100)
qqline(X.100)

#For Chisquare
set.seed(1000)
par(mfrow =c(1, 3))
#Sample Size 25
Y.25=rchisq(n=25,df=8)
qqnorm(Y.25)
qqline(Y.25)
#Sample Size 50
Y.50=rchisq(n=50,df=8)
qqnorm(Y.50)
qqline(Y.50)
#Sample Size 100
Y.100=rchisq(n=100,df=8)
qqnorm(Y.100)
qqline(Y.100)

The Output of code is

>#For Normal

> set.seed(9999)
> par(mfrow =c(1, 3))# for multiple plotting
> #Sample Size 25
> X.25=rnorm(n=25)
> qqnorm(X.25)
> qqline(X.25)
> #Sample Size 50
> X.50=rnorm(n=50)
> qqnorm(X.50)
> qqline(X.50)
> #Sample Size 100
> X.100=rnorm(n=100)
> qqnorm(X.100)
> qqline(X.100)
> #For Chisquare
> set.seed(1000)
> par(mfrow =c(1, 3))
> #Sample Size 25
> Y.25=rchisq(n=25,df=8)
> qqnorm(Y.25)
> qqline(Y.25)
> #Sample Size 50
> Y.50=rchisq(n=50,df=8)
> qqnorm(Y.50)
> qqline(Y.50)
> #Sample Size 100
> Y.100=rchisq(n=100,df=8)
> qqnorm(Y.100)
> qqline(Y.100)


Related Solutions

Generate 100 samples of size n=8 from an exponential distribution with mean 3 . Each row...
Generate 100 samples of size n=8 from an exponential distribution with mean 3 . Each row of your data will denote an observed random sample of size 8, from an exponential distribution with mean 3. Obtain sample mean for each sample, store in another column and make a histogram for sample means. Repeat for n=100. Compare and interpret the histograms you obtained for n=8 and n=100. Submit the histograms along with your one small paragraph comparison. Can you solve it...
r programming generate 100 samples of size n= 5 from a normal random variable with u=2,...
r programming generate 100 samples of size n= 5 from a normal random variable with u=2, o= 3 in r
Draw 1000 samples of size 10, 25, 40 from exponential distribution with mean 10 and threshold...
Draw 1000 samples of size 10, 25, 40 from exponential distribution with mean 10 and threshold 0 and calculate mean for each sample. Now produce histogram for sample mean. a. What do you notice in the shape of the distribution of sample mean as sample size increases? Also, what changes in the standard error of the sample mean? b. As the sample size increases , the sample mean goes to what number?
X ~ N(50, 11). Suppose that you form random samples of 25 from this distribution. Let...
X ~ N(50, 11). Suppose that you form random samples of 25 from this distribution. Let X be the random variable of averages. Let ΣX be the random variable of sums. A. Find the 40th percentile. (Round your answer to two decimal places.) B. Sketch the graph, shade the region, label and scale the horizontal axis for X and find the probability. (Round your answer to four decimal places.) P(48 < X < 54) = C. Sketch the graph, shade...
X ~ N(50, 13). Suppose that you form random samples of 25 from this distribution. Let...
X ~ N(50, 13). Suppose that you form random samples of 25 from this distribution. Let X be the random variable of averages. Let ΣX be the random variable of sums. Part (a) Sketch the distributions of X and X on the same graph. A B) C)D) Part (b) Give the distribution of X. (Enter an exact number as an integer, fraction, or decimal.) X ~ ____(____,____) Part (c) Sketch the graph, shade the region, label and scale the horizontal...
Coding Language: R Generate 100 observations from the normal distribution with mean 3 and variance 1....
Coding Language: R Generate 100 observations from the normal distribution with mean 3 and variance 1. Compute the sample average, the standard error for the sample average, and the 95% confidence interval. Repeat the above two steps 1000 times. Report (a) the mean of the 1000 sample means, (b) the standard deviation of the 1000 sample means, (c) the mean of the 1000 standard errors, and (d) how many times (out of 1000) the 95% confidence intervals include the population...
Suppose samples of size 100 are drawn randomly from a population of size 1000 and the...
Suppose samples of size 100 are drawn randomly from a population of size 1000 and the population has a mean of 20 and a standard deviation of 5. What is the probability of observing a sample mean equal to or greater than 21?
A ______________ is the distribution of sample statistics computed for samples of the same size from...
A ______________ is the distribution of sample statistics computed for samples of the same size from the same population. Sampling Distribution Skewed Distribution Population Distribution Null Distribution t-Distribution Researchers are testing a new mosquito repellent and comparing it to a brand that’s already on the market.  These researchers collect data on 100 people who used the new repellent and 100 people who used the other brand.  They find that 32 out of 100 people using the new repellent were unaffected by mosquitos,...
For a normal distribution where μ = 100 and σ = 10, what is the probability...
For a normal distribution where μ = 100 and σ = 10, what is the probability of: 1. P (X> 80) = 2. P (95 <X <105) = 3. P (X <50) = 4. P (X <100) = 5. P (X <90 and X> 110) = 6.P (X> 150) =
A computer was used to generate ten random numbers from a normal distribution with a set...
A computer was used to generate ten random numbers from a normal distribution with a set of unknown mean and variance: −1.1623, 0.2210, 1.6518, −1.1312, −0.2879, −1.0458, 1.3706, −0.7492, −0.1355, −1.2686. Eight more random normal numbers with the same variance perhaps a different mean were then generated (the mean may or may not actually be different): 0.3472, 2.2437, 1.0712, 2.5906, 0.5163, −1.1743, 0.0473, −0.8338. (a) What do you think the means of the random normal number generators were? What do...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT