Docsity

Stat 405-505 Homework 2: Vector R Ranking and Confidence Intervals - Prof. Norou Diawara, Assignments of Statistics

Toggle sidebar
bg1
Old Dominion University
Mathematics-Statistics Department
Norou Diawara
Fall 2008 Semester
Stat 405-505
Homework 2
Due date: September 17th
Explain your answers.
Questions
1. Suppose a and y are two vectors of the same length, say n. Let for each i= 1,·, n
ridenote the rank of xsiamong the x, where ysiis the ith smallest value among the y.
Write a code that returns the vector R= (r1, r2,· · · , rn).
For example if x= (−1,0,1,2,−3) and y= (1,3,2,5,8),
then n= 5, s1= 1, s2= 3, s3= 2, s4= 4, s5= 5.
Hence R= (2,4,3,5,1).
2. Write a code that constructs a 95% confidence interval for the mean when the sample
variance σ2is known. The code should include the data vector, the σ2sample variance,
and the level of confidence desired. You can try it for a 95 or 91 % confidence interval
on a data.
3. In Blackboard, there is a data set called muscle.
(a) Plot mass vs age
(b) Interpret the slope
(c) Predict a 90% confidence interval for a 66 year old person.
Let me know if you have any questions.

Partial preview of the text

Download Stat 405-505 Homework 2: Vector R Ranking and Confidence Intervals - Prof. Norou Diawara and more Assignments Statistics in PDF only on Docsity!

Old Dominion University Mathematics-Statistics Department Norou Diawara Fall 2008 Semester Stat 405-

Homework 2 Due date: September 17th

Explain your answers.

Questions

  1. Suppose a and y are two vectors of the same length, say n. Let for each i = 1, ·, n

ri denote the rank of xsi among the x, where ysi is the ith^ smallest value among the y. Write a code that returns the vector R = (r 1 , r 2 , · · · , rn). For example if x = (− 1 , 0 , 1 , 2 , −3) and y = (1, 3 , 2 , 5 , 8), then n = 5, s 1 = 1, s 2 = 3, s 3 = 2, s 4 = 4, s 5 = 5. Hence R = (2, 4 , 3 , 5 , 1).

  1. Write a code that constructs a 95% confidence interval for the mean when the sample variance σ^2 is known. The code should include the data vector, the σ^2 sample variance, and the level of confidence desired. You can try it for a 95 or 91 % confidence interval on a data.
  2. In Blackboard, there is a data set called muscle.

(a) Plot mass vs age (b) Interpret the slope (c) Predict a 90% confidence interval for a 66 year old person.

Let me know if you have any questions.