Assignment # 3 Solutions to lab Part(Numerical answers are random and therefore may slightly vary)
Fall 2013
Last Name ——————————————- ,
First ———————-
Student # ————————
Lab section (A1 , . . . A4 , B1 . . . , B4 , C1 · · · C4 , or D1 , · · · , D4 ) ———————–
Due in class: Sec. A, B: Tue. Nov. 12, Sec. C: Wed. Nov. 13, Sec. D: Mon. Nov. 11.
Total mark=100. Marks for each question are given in [ ]
Part I. Lab questions. Use only blanks left to answer lab questions. Provide all histograms you are asked to print, but DO NOT print data you are asked to generate.
1. Continuous distributions:
Generate and store in column c1 10,000 values from the uniform distribution on the interval
[3,7] as follows: random 10000 c1; uniform 3 7.
[3] a. Use mean command to find the sample mean x of these data 4.996
¯
[2] b. What is the mean µ of the uniform distribution on the interval [3,7]? 5
[1] c. Compare µ to the value x you found in part a). very close
¯
Generate and store in column c2 1,000 values from exponential distribution with parameter λ = .125 as follows: random 1000 c2; exponential 8.
Note: The mean µ and the standard deviation σ of such distribution are both equal to
1/λ = 8 and this is the value you are asked to enter in the command above.
[3] d. Use desc command to find the sample mean x and sample standard deviation s for
¯
these 1,000 data 8.63 and 8.456
Are x and s close to the value 1/λ = 8?yes Why?µ = σ = 1/λ = 8
¯
[3] e. Print (and include in your assignment) the histogram of the 1,000 values you generated from this exponential distribution. What is the shape of this distribution?———————–
2. Normal distribution: Generate and store in column c3 10,000 values from the standard normal distribution as follows: random 10000 c3; normal. [3] a. Print (and include in your assignment) the histogram for these data. What is the shape of this histogram? Symmetric
[3] b. What is the value on the horizontal axis around