Question: 4. {It} marks] Suppose a population has N distinct numbers, ul. . . .1uN. 1Write an R function to perform the following tasks: {a} List
![4. {It} marks] Suppose a population has N distinct numbers, ul.](https://s3.amazonaws.com/si.experts.images/answers/2024/07/6682a0dcbad4d_8926682a0dc9775f.jpg)
4. {It} marks] Suppose a population has N distinct numbers, ul. . . .1uN. 1Write an R function to perform the following tasks: {a} List all possible simple random samples of size n = 2 that can be selected from the population. {b} For each sample listed in {a}. compute the sample mean r. {c} Compute E {r} and Vf']. The inputs of the R. function are: {i} a vector u including the N numbers n1, . . . ,nN. {ii} the sample size n. The outputs of the R function are: {i} a table listing all possible samples and the sample means. and {ii} the results of Bitfl and V}. Run the R function for a population with the following numbers: 10, 12, 15, 13, 25. Submit your R code and the results. 5. [:5- marks} For the random samples generated in Question 4. calculate 52 for each sample. 1Write an H. function to show numericallyr that as?) = %02, where o2 is the population variance. Run the R function for a population with the following numbers: 13, 13, 25, 29., 37. Submit your R oode and the results
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
