Question



a) Write a function 1) Take a simple random sample from a population of size n. 2) Compute the mean of sample, repeat it 10000 times and put them in a vector 3) Draw its histogram. 4) Use the function for treesSvolume and comment on that. Using the R-program to genrate the function. Data in R under name trees.
0 0
Add a comment Improve this question Transcribed image text
Answer #1

We will take a simple random sample of size n from a population.

R code is below (all statement starting with # are comments)

The function

#function to take r 3amples of 31ze n, and draw the histogram of means # input : population from which sample needs to be extracted n- sample size rep= number of repetion DrawH1st<-function (p,n, r) { #Initialize a variable to hold sample mean xbar<-numeric(r) #repeat rep number of times for (i in 1:r) i #take a simple random sample x<-sample (p, size=n, replace=FALSE) #calculate the sample mean xbar[i]<-mean (x) #draw the histogram hist (xbar, main-Histogram of sample mean,xlab-Sample mean) #3et the random number seed set.seed (123) #set the sample size n<-10 #set the number of repetions rep<-10000 #call the function for trees$Volume DrawHist (trees$Volume,n, rep)

Get the following histogram

Histogram of sample mear in 15 20 25 30 35 40 45 Sample mean

We know that from the central limit theorem, the sampling distribution of mean approximates a normal distribution. We also know that the mean of the sampling distribution of mean is equal to the population mean.

The histogram plotted has a bell shape and hence the sampling distribution of mean approximates a normal curve.

The population mean of the trees$Volume is obtained using

mean(trees$Volume)

We get the population mean of Volume=30.17. We can see that the histogram has a mean at around 30

Add a comment
Know the answer?
Add Answer to:
a) Write a function 1) Take a simple random sample from a population of size n....
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Simple random sampling uses a sample of size n from a population of size N to...

    Simple random sampling uses a sample of size n from a population of size N to obtain data that can be used to make inferences about the characteristics of a population. Suppose that, from a population of 58 bank accounts, we want to take a random sample of four accounts in order to learn about the population. How many different random samples of four accounts are possible?

  • Simple random sampling uses a sample of size n from a population of size N to...

    Simple random sampling uses a sample of size n from a population of size N to obtain data that can be used to make inferences about the characteristics of a population. Suppose that, from a population of 60 bank accounts, we want to take a random sample of nine accounts in order to learn about the population. How many different random samples of nine accounts are possible?

  • Simple random sampling uses a sample of size n from a population of size N to...

    Simple random sampling uses a sample of size n from a population of size N to obtain data that can be used to make inferences about the characteristics of a population. Suppose that, from a population of 60 bank accounts, we want to take a random sample of six accounts in order to learn about the population. How many different random samples of six accounts are possible?

  • A. Suppose you take a sample of size n from a population and calculate a statistic...

    A. Suppose you take a sample of size n from a population and calculate a statistic from that sample. The statistic could be a sample proportion p, a sample mean x, or another statistic. Then suppose we repeat this process over and over again until we find all possible samples of size n from the population (this is a theoretical idea) and we calculate the same statistic from 1. each sample. The collection of all of the statistics calculated is...

  • A simple random sample of size n = 20 is drawn from a population that is...

    A simple random sample of size n = 20 is drawn from a population that is normally distributed. The sample mean is found to be x = 66 and the sample standard deviation is found to be s = 10. Construct a 90​% confidence interval about the population mean.

  • A simple random sample of size n = 40 is drawn from a population. The sample...

    A simple random sample of size n = 40 is drawn from a population. The sample mean is found to be x= 120.9 and the sample standard deviation is found to be s = 12.1. Construct a 99% confidence interval for the population mean. The lower bound is (Round to two decimal places as needed.)

  • you take a random sample size of 1500 from population 1 and a random sample size...

    you take a random sample size of 1500 from population 1 and a random sample size of 1500 from population two. the mean of the first sample size is 76; the sample standard deviation is 20. the mean of the second sample is 62; the sample standard deviation is 18. construct the 90% confidence interval estimate of the difference between the means of the two populations representwd here and report both the upper and lower bound of the interval.

  • A simple random sample of size n is drawn from a population that is normally distributed....

    A simple random sample of size n is drawn from a population that is normally distributed. The sample mean, x, is found to be 106, and the sample standard deviation, s, is found to be 10. (a) Construct a 90% confidence interval about u if the sample size, n, is 22. (b) Construct a 90% confidence interval about u if the sample size, n, is 27. (c) Construct a 99% confidence interval about u if the sample size, n, is...

  • A simple random sample of size n is drawn from a population that is normally distributed....

    A simple random sample of size n is drawn from a population that is normally distributed. The sample mean, x, is found to be 115, and the sample standard deviation, s, is found to be 10 (a) Construct a 98% confidence interval about if the sample size, n, s 14 (b) Construct a 98% confidence interval about μ if the sample size, n, is 19 (c) Construct a 99% confidence interval about if the sample size, n, s 14 (d)...

  • simple random sample of size n= 40 is drawn from a population. The sample mean is...

    simple random sample of size n= 40 is drawn from a population. The sample mean is found population mean. be x 120.6 and the sample standard deviation is found to be s 12.6. Construct a 99% confidence interval for the The lower bound is (Round to two decimal places as needed.)

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT