Question

In: Math

Each of the distributions below could be used to model the time spent studying for an...

Each of the distributions below could be used to model the time spent studying for an exam. Take one random sample of size 25 from each of the distributions below. Then, take 1,000 resamples (i.e., sample with replacement) of size 25 from your sample. In each case (a,b,c), plot the empirical distribution of the sample mean, estimate the mean of the sample mean, and estimate the standard deviation of the sample mean. Compare the results to the theoretical results.

a. N(5, 1.52)

b. Unif(0,10)

c. Gamma(5,1)

Solutions

Expert Solution

#one random sample of size 25 for each given distribution.

> #a)

> x1=rnorm(25,5,1.52)

> x1

[1] 5.020279 6.275468 2.575940 4.717283 5.177968 3.445100 5.743654 4.377764

[9] 5.141826 5.395002 2.745362 2.306020 3.991462 5.253398 5.323520 5.756974

[17] 5.982216 3.708627 6.700402 5.557969 6.233668 7.673463 3.529887 3.270846

[25] 4.900066

> #b)

> y1=runif(25,0,10)

> y1

[1] 3.7154953 5.4179538 4.5558985 3.9164641 8.4782767 6.6188898 3.5583676

[8] 4.5515636 8.2401313 4.4148929 6.1898235 7.8106121 6.8859722 7.6767456

[15] 4.0757638 4.6039999 6.6601718 5.8863809 7.6553750 2.1552143 0.3794588

[22] 0.2253377 2.1610553 4.7108428 4.3781013

> #c)

> z1=rgamma(25,5,1)

> z1

[1] 5.055108 9.810892 6.974359 5.139720 5.786588 3.516185 1.907632 2.921216

[9] 2.598329 6.308906 5.025108 4.306898 2.691387 3.365903 4.691390 5.755437

[17] 2.614200 7.658446 3.617847 3.525997 3.944987 3.150522 4.215006 4.785253

[25] 5.999284

> # 1000 resample

> #a)

> x2=sample(x1,1000,replace=T)

> head(x2,5)

[1] 4.377764 5.253398 4.377764 5.395002 3.708627

> smean=c()

> for(i in 1:m)

+ {

+ smean[i]=mean(x2[i])

+ }

> emp=ecdf(smean)

> plot(emp)

>

me=mean(smean)

> me

[1] 4.85455

> std=sd(smean)

> std

[1] 1.327576

> #b)

> y2=sample(y1,1000,replace=T)

> head(y2,5)

[1] 8.240131 5.886381 5.886381 4.378101 5.886381

> smean=c()

> for(i in 1:m)

+ {

+ smean[i]=mean(y2[i])

+ }

> emp=ecdf(smean)

> plot(emp)

me=mean(smean)

> me

[1] 4.900362

> std=sd(smean)

> std

[1] 2.30114

> #c)

> z2=sample(z1,1000,replace=T)

> head(z2,5)

[1] 2.921216 2.614200 9.810892 4.306898 5.755437

> smean=c()

> for(i in 1:m)

+ {

+ smean[i]=mean(z2[i])

+ }

> emp=ecdf(smean)

> plot(emp)

> me=mean(smean)

> me

[1] 4.602357

> std=sd(smean)

> std

[1] 1.795943


Related Solutions

Each of the distributions below could be used to model the time spent studying for an...
Each of the distributions below could be used to model the time spent studying for an exam. Take 1,000 random samples of size 25 from each of the distributions below. In each case (a,b,c), plot the empirical distribution of the sample mean, estimate the mean of the sample mean, and estimate the standard deviation of the sample mean. Compare the results to the theoretical results. a. N(5, 1.52) b. Unif(0,10) c. Gamma(5,1)
Using the data, fit an appropriate regression model to determine whether time spent studying (hours) is...
Using the data, fit an appropriate regression model to determine whether time spent studying (hours) is a useful predictor of the chance of passing the exam (result, 0=fail 1=pass). Formally assess the overall fit of the model. DATA three; INPUT result hours; /* result=0 is fail; result=1 is pass */ cards; 0 0.8 0 1.6 0 1.4 1 2.3 1 1.4 1 3.2 0 0.3 1 1.7 0 1.8 1 2.7 0 0.6 0 1.1 1 2.1 1 2.8 1...
A teacher is interested in the relationship between the time spent studying for an exam and...
A teacher is interested in the relationship between the time spent studying for an exam and exam score. The table lists scores for 5 students. The value of b0 = 67.91 and the value of b1 = 0.75 Hours studied 5 18 3 15 17 Exam score 63 87 79 72 82 . Step 4 of 6 : Calculate the Coefficient of Determination (R2). Round answer to four decimal places.
A researcher believes that there is a positive relationship between the time spent in studying and...
A researcher believes that there is a positive relationship between the time spent in studying and the score a student gets at the end of the semester. She selected a sample of students and recorded the following data: Time Spent in minutes Score out of 100 120 86 75 83 60 78 45 75 180 91 30 72 90 84 After analyzing the data using Microsoft Excel, the researcher got the outputs below: Answer the following (Please, use at least...
A multiple regression model is to be constructed to model the time spent using the internet...
A multiple regression model is to be constructed to model the time spent using the internet per week among internet users. The explanatory variables are age, hours spent working per week and annual income. Data has been collected on 30 randomly selected individuals: Time using internet (minutes) Age Hours working per week Annual income ('000) 140 56 39 28 257 35 31 79 163 35 35 34 115 33 52 27 182 45 36 37 214 51 57 80 187...
We spent a lot of time discussing and studying the impact of political hacking in elections....
We spent a lot of time discussing and studying the impact of political hacking in elections. What is being done to ensure that its impact does not impact the validity of the 2020 election? What preventions are in place? Being almost a month out from November 3rd election day, are we ready? Research this question and answer it .
In studying the relationship between average daily temperature and time spent on a telephone, suppose you...
In studying the relationship between average daily temperature and time spent on a telephone, suppose you computed r=0.607 using n=31 data points. Using the critical values table below, determine if the value of r is significant or not.
Homer is studying the relationship between the average daily temperature and time spent watching television and...
Homer is studying the relationship between the average daily temperature and time spent watching television and has collected the data shown in the table. The line of best fit for the data is yˆ=−0.6x+94.5. Assume the line of best fit is significant and there is a strong linear relationship between the variables. Temperature (Degrees) 40506070 Minutes Watching Television 70655952 (a) According to the line of best fit, what would be the predicted number of minutes spent watching television for an...
The normal distribution is a family of distributions that is often used to model business processes....
The normal distribution is a family of distributions that is often used to model business processes. Based on your readings for this module, give one example, different from those supplied in the overview, of how the normal distribution can be used in a working environment. This example may be from your own experience. Be sure to explain how the normal distribution is used in the example you provide. In responding to your peers, select responses that use a normal distribution...
A member of the Pareto family of distributions (often used in economics to model income distributions) has a distribution function given by
A member of the Pareto family of distributions (often used in economics to model income distributions) has a distribution function given byMath output errorF ( y ) = \left\{ \begin{array} { l l } { 0 , } & { y < \beta } \\ { 1 - \left( \frac { \beta } { y } \right) ^ { \alpha } , } & { y \geq \beta } \end{array} \right.F(y)={0,1−(yβ​)α,​y 0α,β>0. Find the density function.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT