2. The following code simulates 5000 samples of t random variables on 2 degrees of freedom,...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
2. The following code simulates 5000 samples of t random variables on 2 degrees of freedom, with a sample of size 20, and plots the sample standard deviations against the sample means. The result shows a pattern which means that the mean and the standard deviation are not independent. One can be predicted from the other. m < 5000; n <- 20; nu < 2 Z <- matrix (rt (m*n, df=nu), nrow-n) # t data on nu df zbar < apply (Z, 2, mean); Sz <- apply (Z, 2, sd) par (mar = c(4, 4.5, 1, 1)) plot (Sz zbar, xlab-expression (bar (Z)), ylab-expression (S[Z])) (a) Modify the code and run it for 3, 5, 10, 20 and 100 degrees of freedom, respectively. Comment on what you see in the plots, and infer from the plots whether Z and Sz are (approximately) independent in each case. (b) Now modify the code so that rt (m*n, df = nu) is replaced with rexp (m*n). Comment on the result, and interpret. (c) Now replace the t simulator with the uniform(0,1) simulator. Comment on the result, and interpret. (d) Re-run the simulations above using a sample of size 100 instead of 20. Does increasing the sample size make a difference? 2. The following code simulates 5000 samples of t random variables on 2 degrees of freedom, with a sample of size 20, and plots the sample standard deviations against the sample means. The result shows a pattern which means that the mean and the standard deviation are not independent. One can be predicted from the other. m < 5000; n <- 20; nu < 2 Z <- matrix (rt (m*n, df=nu), nrow-n) # t data on nu df zbar < apply (Z, 2, mean); Sz <- apply (Z, 2, sd) par (mar = c(4, 4.5, 1, 1)) plot (Sz zbar, xlab-expression (bar (Z)), ylab-expression (S[Z])) (a) Modify the code and run it for 3, 5, 10, 20 and 100 degrees of freedom, respectively. Comment on what you see in the plots, and infer from the plots whether Z and Sz are (approximately) independent in each case. (b) Now modify the code so that rt (m*n, df = nu) is replaced with rexp (m*n). Comment on the result, and interpret. (c) Now replace the t simulator with the uniform(0,1) simulator. Comment on the result, and interpret. (d) Re-run the simulations above using a sample of size 100 instead of 20. Does increasing the sample size make a difference?
Expert Answer:
Answer rating: 100% (QA)
Lets break down each part of the task a For each value of degr... View the full answer
Related Book For
Stats Data and Models
ISBN: 978-0321986498
4th edition
Authors: Richard D. De Veaux, Paul D. Velleman, David E. Bock
Posted Date:
Students also viewed these programming questions
-
Find the magnitude, direction, and placement (from point A) of a parallel vector F6 that will produce equilibrium in each forcediagram. F4 2375 N Fa 750 N F2 = 500N 0.500 m 1.00 m 1.20 m 1.75 m Fi...
-
Given this expression, what can we say about the problem domain? tBoat (BoatSerialNo, BoatType, Manufacturer, Price, Customer, Date Of Sales Rep) SalesRep should not be in the expression at all...
-
What would it imply if, while performing a SWOT analysis, an organization could not identify any opportunities? What if it could not identify any threats?
-
A teller at a drive-up window at a bank had the following service times (in minutes) for 20 randomly selected customers: a. Determine the mean of each sample. b. If the process parameters are...
-
For each of the following situations, calculate the \(z\)-statistic \((z)\), make a decision about the null hypothesis (reject, do not reject), and indicate the level of significance \((p>.05, p
-
One subunit of Speed Sports Company had the following financial results last month: Requirements 1. Complete the performance evaluation report for this subunit (round to four decimals). 2. Based on...
-
Seidner Company had the following account balances at the end of the first year of operations: Revenues $102,000 Salaries Expense $18,000 Dividends $13,000 Utilities Expense $12,000 Advertising...
-
Wayland Custom Woodworking is a firm that manufactures custom cabinets and woodwork for business and residential customers. Students will have the opportunity to establish payroll records and to...
-
Question 1 (Word limit: 300 words) "The use of super-voting shares in private and public organisations undermines the fundamental rights of shareholders. This, combined with supermajority...
-
Find the cost of a home in 30 years, assuming an annual inflation rate of \(1 \%\), if the present value of the house is $ 225,000 .
-
Expand the propositional calculus representation scheme introduced by Williams and Nayak for describing state transitions for their propulsion system.
-
Pick one of the application areas for agent architectures summarized in Section 7.4. Choose a research or application paper in that area. Design an organization of agents that could address the...
-
The system shown in the given figure has a second order response with a damping ratio of 0.6 and a frequency of damped oscillations of \(10 \mathrm{rad} / \mathrm{sec}\). The values of...
-
How should the term charity be defined? What are the arguments against and in favor of counting the provision of healthcare in and of itself as charity?
-
1. You are considering two alternative investments. You can invest in a risky asset with a positive risk premium and returns in each of the two years that will be identically distributed and...
-
Is it a breach of fiduciary duty for a director of a real estate investment trust (REIT) negotiating a joint venture on behalf of the REIT with another director for the development of a portfolio of...
-
Suppose you really want the Hope Solo picture. How many boxes of cereal do you need to buy to be pretty sure of getting at least one? First, define what "pretty sure" means to you. Then run a...
-
Suppose the couples in Exercise 41 choose the teams by having one member of each couple write their names on the cards and the other people each pick a card at random. How likely is it that every...
-
Which of these scatterplots show a) Little or no association? b) A negative association? c) A linear association? d) A moderately strong association? e) A very strong association (1) (3) (4)
-
A truck is traveling at a constant \(25 \mathrm{~m} / \mathrm{s}\) when a motorcycle speeds past at a constant \(40 \mathrm{~m} / \mathrm{s}\). On which vehicle, if either, is the magnitude of the...
-
Sketch the \(\sum F_{x}(t)\) curve for the vector sum of forces exerted on the object whose \(x\) component of momentum is plotted in Figure P8.3. Curve sections are numbered for reference. Data from...
-
You wish to move a crate. (a) Is there a minimum value for the magnitude of the pushing force you have to exert to set the crate in motion? (b) Is there a minimum value for the magnitude of the...
Study smarter with the SolutionInn App