Question

In: Math

Simulate a distribution of 500 t-scores with 24 degrees of freedom into a variable called tsim...

Simulate a distribution of 500 t-scores with 24 degrees of freedom into a variable called tsim using the rt() function. Solve using R.

Solutions

Expert Solution

The R code is


set.seed(123)

tsim <- rt(n=500,df=24)

tsim

The result is

> rt(n=500,df=24)
[1] 0.695688591 -1.459217041 -0.113267582 -1.437886017 1.607152318 2.389279758 0.287853093
[8] 0.716240651 -0.898415450 -0.262350435 -0.075364093 -0.179340325 -0.981222228 0.455451374
[15] -0.116909091 -0.147480895 -3.720057616 -0.433006514 0.837632777 1.478826437 0.474303151
[22] -0.082095891 -0.029346229 0.333547622 -1.456516375 0.122614186 0.418824324 2.734057036
[29] 0.290836948 0.047662977 2.257626566 -1.032008395 -0.610492283 -0.354747000 -0.903317316
[36] 0.416319140 -0.864811384 1.052873088 -0.284715810 0.938951441 0.268746840 1.416945558
[43] 1.621939609 0.148644964 0.032804270 -0.662984498 -1.063270450 -0.195030688 1.681213823
[50] -0.265519034 1.444641849 -0.748225441 0.821532737 0.319198537 1.755614425 -0.861436250
[57] -0.992984130 0.973974416 0.209258777 1.472865625 0.650153678 0.745706395 -0.303322860
[64] -0.691321652 1.132532985 0.722731534 0.398611979 -0.019995931 -0.332546785 -0.331226366
[71] -1.316313205 -1.540725250 -0.504263508 -0.018069341 2.486408382 -0.026487559 -0.903240540
[78] -0.757704242 -0.182788802 -0.956939677 -0.916040762 -0.420507529 0.831482779 0.653290453
[85] 1.524698157 1.874174115 -1.404769375 2.893030772 -0.250764154 -0.455216229 -0.006025152
[92] -0.054236579 0.210649648 -0.617531003 0.116960300 0.293855968 -0.537356110 1.026613791
[99] -0.368234760 -0.804863561 0.820319368 -0.089433219 -0.824213662 0.855549169 -0.099065002
[106] 1.836131791 1.267785883 -1.540034248 0.855995704 -0.346688287 1.654493972 -0.314166174
[113] -1.696198033 -1.703600194 -2.157144788 -0.183552164 1.065817248 0.893117909 -1.266611428
[120] -0.444700323 0.071632472 0.033422902 -0.808631058 0.769262551 1.384534294 -0.218350966
[127] 1.032959810 1.278773904 0.276524288 -1.375701452 1.427317761 -0.428559046 0.992637530
[134] -1.995173055 0.971431894 1.195740345 -1.935525188 -0.454570953 0.705144961 0.899504237
[141] 1.550329322 -1.341627884 1.380926837 1.425149279 1.260276040 -1.727008451 -2.624113905
[148] 0.256902293 0.558624250 1.693012645 -0.071611568 -1.070004024 -1.407698269 -2.172471500
[155] -0.330325153 0.422336052 -3.348483506 0.639390265 0.934099249 -0.202987247 -0.857411650
[162] -0.347225941 -1.810411806 -1.221763067 -0.881053758 -0.019856510 -0.738414550 -1.007013774
[169] 1.319462110 -1.239637435 0.785752284 0.411659357 -0.479559684 -0.703118792 -1.358829470
[176] -0.465095478 -0.026810606 -1.777720520 -1.332128633 0.483713441 0.679603501 0.575067780
[183] 0.582332110 0.511435266 0.287235246 1.453614916 0.567353266 -0.198889782 -0.184329631
[190] 0.359847366 0.143493871 1.649106389 0.284714814 -0.864012434 -0.611080576 0.396604588
[197] -2.763144948 0.105985464 0.024311979 -1.967899231 -0.479127066 -0.267158928 -0.330686608
[204] -0.475740325 -0.815535750 -0.874239927 -2.032905436 -1.400841267 -0.615627913 -0.315791124
[211] -0.231881865 0.268274870 0.112141301 0.701056020 -0.473233707 -0.395316049 0.300291024
[218] -1.071141603 0.181350702 0.343945025 -0.720383745 -0.061528464 -0.111987441 0.728283147
[225] -0.533545123 -0.293060603 -0.706204398 -1.129149854 0.156063715 -0.123306650 -1.670366021
[232] 0.947683665 -0.675459377 0.668281294 0.685855625 0.698186739 0.402707624 -0.440078693
[239] 0.873526111 -0.064290700 0.480923016 -0.506147050 -0.686586207 0.205215328 -1.501708144
[246] -0.576758979 0.202328695 -0.911523256 -1.193925878 0.501102642 -0.304665316 1.250470031
[253] -0.232708087 -1.069001882 1.500399562 0.027966296 -0.912727319 -1.097922939 1.385697185
[260] -0.253209849 -0.706445521 -1.007766402 0.238804705 0.849490727 1.640183184 -0.028073100
[267] -1.009929987 3.113813464 0.809309110 1.632243354 1.658291526 0.887968659 -1.624319643
[274] -0.539981339 0.842506374 -0.785129945 0.206662634 -0.686735253 0.353341163 0.262861445
[281] 0.166871985 0.333927332 0.270618340 0.683120500 0.058457256 -0.481670174 0.178610391
[288] 0.791098233 -1.381064702 0.494043715 0.109386661 1.093261695 -0.043396119 -0.456653512
[295] -0.885996019 0.090573267 0.442279314 0.260746615 -0.971268473 -1.045860947 -1.203054312
[302] -0.882415051 0.761113606 0.308608403 1.377465468 -0.691200684 -0.283783553 -0.097430829
[309] -1.752682792 1.340310327 1.697033395 0.208225709 1.119035548 -0.997298233 -0.180036867
[316] -0.278210550 0.486717379 -0.003815500 -0.162451959 0.560344876 -0.653566597 1.571813696
[323] -1.645827778 -0.053148215 0.644600989 2.961803729 -1.097210619 -1.749691113 -1.616597461
[330] -0.365191601 0.311943467 -0.104211155 0.224726703 1.971170815 -2.143415391 -2.316347678
[337] -1.639365840 0.832063693 -0.241249517 -0.054567387 0.148747985 0.223703841 -0.004325579
[344] -0.432629287 -0.563459616 -1.491983785 -2.074380428 -2.132452818 -1.731343688 0.349328958
[351] 1.195034960 -1.696026111 0.403049402 -2.069521200 0.148863921 -0.293813490 -3.330497149
[358] 1.222721527 0.863905969 1.398149824 -1.131573166 -0.075868330 -0.299611196 -0.302385508
[365] 1.099621804 -1.729949664 -0.269683115 0.390909989 0.391883341 -0.572316860 -0.616844563
[372] 0.666323661 1.022583330 0.461286498 -0.086538297 -0.879929178 -0.785461145 1.630673845
[379] -1.314549243 -1.627138054 -0.887697392 1.252766838 0.837513662 -4.148391433 1.177128802
[386] 0.640644345 1.298479286 -2.141574945 1.155042382 0.551628621 -0.119757256 -0.934380605
[393] -0.898256318 0.524732646 1.068320500 0.292507116 0.592778258 1.220321026 0.510889683
[400] 0.192763387 -1.193029740 -1.672784437 0.923375491 -1.853733585 1.733455768 0.646501756
[407] 1.365387483 0.218863971 0.240385850 -0.660125724 0.403377480 -0.277706762 -1.183695145
[414] -0.489359971 -0.270097352 2.204737979 0.131114154 0.100651238 0.154202407 0.477394969
[421] 0.421497737 0.874772558 2.296030348 0.047068373 0.066816159 0.800173189 -0.534144399
[428] 0.944886781 -0.601019156 -0.638389027 0.111628064 -1.202972177 -1.695101371 1.171537456
[435] 0.416157800 0.820202901 -1.133106209 -0.079380959 -1.495387669 -0.156560557 -0.018732009
[442] -0.861335805 2.241702372 -0.323247920 3.526884286 0.182630711 0.225394056 0.231917566
[449] -0.171744922 1.540450364 0.187708891 1.361418887 0.894612562 0.752182101 -1.117371139
[456] 0.434030482 2.191759114 -1.197466478 2.575802042 -1.447212668 -0.278609706 -0.181349543
[463] -0.830381564 0.677884897 -1.112122643 1.664219564 -1.992030840 1.589805580 0.472589037
[470] 0.045599159 -1.146007625 0.439087716 -1.094962783 -0.582583382 0.328601584 -1.575030191
[477] -1.203887780 -1.460237301 0.782541907 -0.122042321 -0.604912865 0.388904870 0.513035035
[484] 0.846190072 -1.397881126 -0.327434101 -1.225949880 -0.494786808 -2.370236072 0.963224695
[491] -0.076843761 -0.553528405 0.317443242 1.024562395 -0.426769096 0.815360006 -1.494144567
[498] -0.091884087 -1.181742380 -0.692283802
> set.seed(123)
>
> tsim <- rt(n=500,df=24)
> tsim
[1] -0.592643286 -1.459217041 -0.113267582 -1.437886017 1.607152318 2.389279758 0.287853093
[8] 0.716240651 -0.898415450 -0.262350435 -0.075364093 -0.179340325 -0.981222228 0.455451374
[15] -0.116909091 -0.147480895 -3.720057616 -0.433006514 0.837632777 1.478826437 0.474303151
[22] -0.082095891 -0.029346229 0.333547622 -1.456516375 0.122614186 0.418824324 2.734057036
[29] 0.290836948 0.047662977 2.257626566 -1.032008395 -0.610492283 -0.354747000 -0.903317316
[36] 0.416319140 -0.864811384 1.052873088 -0.284715810 0.938951441 0.268746840 1.416945558
[43] 1.621939609 0.148644964 0.032804270 -0.662984498 -1.063270450 -0.195030688 1.681213823
[50] -0.265519034 1.444641849 -0.748225441 0.821532737 0.319198537 1.755614425 -0.861436250
[57] -0.992984130 0.973974416 0.209258777 1.472865625 0.650153678 0.745706395 -0.303322860
[64] -0.691321652 1.132532985 0.722731534 0.398611979 -0.019995931 -0.332546785 -0.331226366
[71] -1.316313205 -1.540725250 -0.504263508 -0.018069341 2.486408382 -0.026487559 -0.903240540
[78] -0.757704242 -0.182788802 -0.956939677 -0.916040762 -0.420507529 0.831482779 0.653290453
[85] 1.524698157 1.874174115 -1.404769375 2.893030772 -0.250764154 -0.455216229 -0.006025152
[92] -0.054236579 0.210649648 -0.617531003 0.116960300 0.293855968 -0.537356110 1.026613791
[99] -0.368234760 -0.804863561 0.820319368 -0.089433219 -0.824213662 0.855549169 -0.099065002
[106] 1.836131791 1.267785883 -1.540034248 0.855995704 -0.346688287 1.654493972 -0.314166174
[113] -1.696198033 -1.703600194 -2.157144788 -0.183552164 1.065817248 0.893117909 -1.266611428
[120] -0.444700323 0.071632472 0.033422902 -0.808631058 0.769262551 1.384534294 -0.218350966
[127] 1.032959810 1.278773904 0.276524288 -1.375701452 1.427317761 -0.428559046 0.992637530
[134] -1.995173055 0.971431894 1.195740345 -1.935525188 -0.454570953 0.705144961 0.899504237
[141] 1.550329322 -1.341627884 1.380926837 1.425149279 1.260276040 -1.727008451 -2.624113905
[148] 0.256902293 0.558624250 1.693012645 -0.071611568 -1.070004024 -1.407698269 -2.172471500
[155] -0.330325153 0.422336052 -3.348483506 0.639390265 0.934099249 -0.202987247 -0.857411650
[162] -0.347225941 -1.810411806 -1.221763067 -0.881053758 -0.019856510 -0.738414550 -1.007013774
[169] 1.319462110 -1.239637435 0.785752284 0.411659357 -0.479559684 -0.703118792 -1.358829470
[176] -0.465095478 -0.026810606 -1.777720520 -1.332128633 0.483713441 0.679603501 0.575067780
[183] 0.582332110 0.511435266 0.287235246 1.453614916 0.567353266 -0.198889782 -0.184329631
[190] 0.359847366 0.143493871 1.649106389 0.284714814 -0.864012434 -0.611080576 0.396604588
[197] -2.763144948 0.105985464 0.024311979 -1.967899231 -0.479127066 -0.267158928 -0.330686608
[204] -0.475740325 -0.815535750 -0.874239927 -2.032905436 -1.400841267 -0.615627913 -0.315791124
[211] -0.231881865 0.268274870 0.112141301 0.701056020 -0.473233707 -0.395316049 0.300291024
[218] -1.071141603 0.181350702 0.343945025 -0.720383745 -0.061528464 -0.111987441 0.728283147
[225] -0.533545123 -0.293060603 -0.706204398 -1.129149854 0.156063715 -0.123306650 -1.670366021
[232] 0.947683665 -0.675459377 0.668281294 0.685855625 0.698186739 0.402707624 -0.440078693
[239] 0.873526111 -0.064290700 0.480923016 -0.506147050 -0.686586207 0.205215328 -1.501708144
[246] -0.576758979 0.202328695 -0.911523256 -1.193925878 0.501102642 -0.304665316 1.250470031
[253] -0.232708087 -1.069001882 1.500399562 0.027966296 -0.912727319 -1.097922939 1.385697185
[260] -0.253209849 -0.706445521 -1.007766402 0.238804705 0.849490727 1.640183184 -0.028073100
[267] -1.009929987 3.113813464 0.809309110 1.632243354 1.658291526 0.887968659 -1.624319643
[274] -0.539981339 0.842506374 -0.785129945 0.206662634 -0.686735253 0.353341163 0.262861445
[281] 0.166871985 0.333927332 0.270618340 0.683120500 0.058457256 -0.481670174 0.178610391
[288] 0.791098233 -1.381064702 0.494043715 0.109386661 1.093261695 -0.043396119 -0.456653512
[295] -0.885996019 0.090573267 0.442279314 0.260746615 -0.971268473 -1.045860947 -1.203054312
[302] -0.882415051 0.761113606 0.308608403 1.377465468 -0.691200684 -0.283783553 -0.097430829
[309] -1.752682792 1.340310327 1.697033395 0.208225709 1.119035548 -0.997298233 -0.180036867
[316] -0.278210550 0.486717379 -0.003815500 -0.162451959 0.560344876 -0.653566597 1.571813696
[323] -1.645827778 -0.053148215 0.644600989 2.961803729 -1.097210619 -1.749691113 -1.616597461
[330] -0.365191601 0.311943467 -0.104211155 0.224726703 1.971170815 -2.143415391 -2.316347678
[337] -1.639365840 0.832063693 -0.241249517 -0.054567387 0.148747985 0.223703841 -0.004325579
[344] -0.432629287 -0.563459616 -1.491983785 -2.074380428 -2.132452818 -1.731343688 0.349328958
[351] 1.195034960 -1.696026111 0.403049402 -2.069521200 0.148863921 -0.293813490 -3.330497149
[358] 1.222721527 0.863905969 1.398149824 -1.131573166 -0.075868330 -0.299611196 -0.302385508
[365] 1.099621804 -1.729949664 -0.269683115 0.390909989 0.391883341 -0.572316860 -0.616844563
[372] 0.666323661 1.022583330 0.461286498 -0.086538297 -0.879929178 -0.785461145 1.630673845
[379] -1.314549243 -1.627138054 -0.887697392 1.252766838 0.837513662 -4.148391433 1.177128802
[386] 0.640644345 1.298479286 -2.141574945 1.155042382 0.551628621 -0.119757256 -0.934380605
[393] -0.898256318 0.524732646 1.068320500 0.292507116 0.592778258 1.220321026 0.510889683
[400] 0.192763387 -1.193029740 -1.672784437 0.923375491 -1.853733585 1.733455768 0.646501756
[407] 1.365387483 0.218863971 0.240385850 -0.660125724 0.403377480 -0.277706762 -1.183695145
[414] -0.489359971 -0.270097352 2.204737979 0.131114154 0.100651238 0.154202407 0.477394969
[421] 0.421497737 0.874772558 2.296030348 0.047068373 0.066816159 0.800173189 -0.534144399
[428] 0.944886781 -0.601019156 -0.638389027 0.111628064 -1.202972177 -1.695101371 1.171537456
[435] 0.416157800 0.820202901 -1.133106209 -0.079380959 -1.495387669 -0.156560557 -0.018732009
[442] -0.861335805 2.241702372 -0.323247920 3.526884286 0.182630711 0.225394056 0.231917566
[449] -0.171744922 1.540450364 0.187708891 1.361418887 0.894612562 0.752182101 -1.117371139
[456] 0.434030482 2.191759114 -1.197466478 2.575802042 -1.447212668 -0.278609706 -0.181349543
[463] -0.830381564 0.677884897 -1.112122643 1.664219564 -1.992030840 1.589805580 0.472589037
[470] 0.045599159 -1.146007625 0.439087716 -1.094962783 -0.582583382 0.328601584 -1.575030191
[477] -1.203887780 -1.460237301 0.782541907 -0.122042321 -0.604912865 0.388904870 0.513035035
[484] 0.846190072 -1.397881126 -0.327434101 -1.225949880 -0.494786808 -2.370236072 0.963224695
[491] -0.076843761 -0.553528405 0.317443242 1.024562395 -0.426769096 0.815360006 -1.494144567
[498] -0.091884087 -1.181742380 -0.692283802


Related Solutions

Consider a random variable T that has a t-distribution with k = 16 degrees of freedom....
Consider a random variable T that has a t-distribution with k = 16 degrees of freedom. What is P(T > 1.8)? Group of answer choices 0.0454 0.9546 0.2499 0.4742 0.8000
Find the value of t for a t-distribution with 3 degrees of freedom such that the...
Find the value of t for a t-distribution with 3 degrees of freedom such that the area to the left of t equals 0.10. Possible Answers: A. 5.841 B. 4.541 C. -2.333 D. -1.638
As the degrees of freedom increase, the t distribution approaches the z distribution. Explain.
As the degrees of freedom increase, the t distribution approaches the z distribution. Explain.
Find the critical value of t for a t-distribution with 30 degrees of freedom such that...
Find the critical value of t for a t-distribution with 30 degrees of freedom such that the area between -t and t is 99% A student records the repair costs for 25 randomly selected computers from a local repair shop where he works. A sample mean of $216.53 and standard deviation of $15.86 are subsequently computed. Assume that the population distribution is approximately normal and s is unknown. Determine the 98% confidence interval for the mean repair cost for all...
For a t-distribution with 15 degrees of freedom, 90% of the distribution is within how many...
For a t-distribution with 15 degrees of freedom, 90% of the distribution is within how many standard deviations of the mean? Select one: a. 1.235 b. 1.576 c. 1.753 d. 1.960
What happens to a Student's t-distribution as the degrees of freedom increase? a.A student's t-distribution diverges...
What happens to a Student's t-distribution as the degrees of freedom increase? a.A student's t-distribution diverges from the standard normal distribution as the degrees of freedom increases b.A student's t-distribution converges to the standard normal distribution as the degrees of freedom increases
What is t distribution and how it is related to degrees of freedom? How is z...
What is t distribution and how it is related to degrees of freedom? How is z distribution different from t distribution?
Why do we need to use degrees of freedom with the t distribution, but not the...
Why do we need to use degrees of freedom with the t distribution, but not the z distribution?
a)For the t distribution with 15 degrees of freedom, calculate P(T < 0.691). b)Consider the population...
a)For the t distribution with 15 degrees of freedom, calculate P(T < 0.691). b)Consider the population of electric usage per month for houses. The standard deviation of this population is 132 kilowatt-hours. What is the smallest sample size to provide a 90% confidence interval for the population mean with a margin of error of 34 or less? (Enter an integer number.) c)In order to estimate the average electric usage per month, a sample of 47 houses were selected and the...
Consider a t distribution with 19 degrees of freedom. Compute P≤t−1.22 . Round your answer to...
Consider a t distribution with 19 degrees of freedom. Compute P≤t−1.22 . Round your answer to at least three decimal places. Consider a t distribution with 10 degrees of freedom. Find the value of c such that =P<−c<tc0.90 . Round your answer to at least three decimal places.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT