Question 2(a)

advertisement
MATH20812: Practical Statistics I
Solutions to Problem Sheet 5
Question 1(a)
Use the option Calc/Make Patterned Data to enter the numbers -3, -2.9, …, 2.9, 3 into
C1.
Use the option Calc/Probability Distributions/Normal to calculate the normal
probability density function at C1 for mu = 0 and sigma = 1, 2, 5 10. Store these data
into C2, C3, C4 and C5, respectively.
Use the option Graph/Scatterplot/With Connect and Groups to plot C2-C5 versus C1
on the same axes.
Finally, change the labels of the graph as required. You should get something like ….
Normal PDF
Variable
C2
C3
C4
C5
0.4
PDF
0.3
0.2
0.1
0.0
-3
-2
-1
0
C1
1
2
3
Question 1(b)
Use the option Calc/Probability Distributions/Normal to calculate the normal
probability density function at C1 for mu = -3, 0, 3 and sigma = 1. Store these data
into C2, C3 and C4, respectively.
Use the option Graph/Scatterplot/With Connect and Groups to plot C2-C4 versus C1
on the same axes.
Finally, change the labels of the graph as required. You should get something like ….
Normal PDF
Variable
C2
C3
C4
0.4
PDF
0.3
0.2
0.1
0.0
-3
-2
-1
0
C1
1
2
3
Question 1(c)
Use the option Calc/Probability Distributions/Normal to calculate the normal
cumulative distribution function at C1 for mu = 0 and sigma = 1, 2, 5 10. Store these
data into C2, C3, C4 and C5, respectively.
Use the option Graph/Scatterplot/With Connect and Groups to plot C2-C5 versus C1
on the same axes.
Finally, change the labels of the graph as required. You should get something like ….
Normal CDF
Variable
C2
C3
C4
C5
1.0
0.8
CDF
0.6
0.4
0.2
0.0
-3
-2
-1
0
C1
1
2
3
Question 1(d)
Use the option Calc/Probability Distributions/Normal to calculate the normal
cumulative distribution function at C1 for mu = -3, 0, 3 and sigma = 1. Store these
data into C2, C3 and C4, respectively.
Use the option Graph/Scatterplot/With Connect and Groups to plot C2-C4 versus C1
on the same axes.
Finally, change the labels of the graph as required. You should get something like ….
Normal CDF
Variable
C2
C3
C4
1.0
0.8
CDF
0.6
0.4
0.2
0.0
-3
-2
-1
0
C1
1
2
3
Question 2(a)
Enter the data into C1. Highlight the column and use the option Stat/Basic
Statistics/Display Descriptive Statistics to obtain
Variable
C1
N
50
N*
0
Variable
C1
Maximum
2.146
Mean
-0.0238
SE Mean
0.152
StDev
1.075
Minimum
-2.048
Q1
-0.914
Median
-0.114
Q3
0.851
So, the estimates of mu and sigma are -0.0238 and 49 / 50 * 1.075 = 1.064,
respectively. The 95% confidence interval for mu is
[ x  t n1,0.025 s / n , x  t n1,0.025 s / n ]. Using the option Calc/Probability
Distributions/t, t 49, 0.025  2.00958. So, the 95% confidence interval for mu is: [0.0238-2.00958*1.075/ 50 , -0.0238+2.00958*1.075/ 50 ] = [-0.329, 0.282]. The
95% confidence interval for sigma is [ s (n  1) /  n21,0.025 , s (n  1) /  n21,0.975 ]. Using
2
the option Calc/Probability Distributions/Chi-Square,  49
, 0.025  70.2224
2
and  49
, 0.975  31.5549. So, the 95% confidence interval is: [1.075*sqrt(49/70.2224),
1.075*sqrt(49/31.5549)] = [0.898, 1.340].
Question 2(b)
Use the option Calc/Make Patterned Data to enter the numbers 1..50 into C2.
Use the option Calc/Calculator to calculate C3 = C2/51.
Again use the option Calc/Probability Distributions/Normal to calculate C4 as inverse
normal cdf at C3. Use the value of mu and sigma given by the estimated value in
2(a). C4 will contain the expected quantiles.
Use the option Data/Sort to store the sorted values of C1 into C5. C5 will contain
observed quantiles.
Use the option Graph/Scatterplot/Simple to plot C4 versus C5.
Click on the graph and select the option Add/Calculated Line to add a 45 degree
straight line.
Finally, change the labels of the graph as required. Your final graph should look like
…..
Quantile Quantile Plot
Expected Quantile
2
1
0
-1
-2
-2
-1
0
Observed Quantile
1
2
Question 2(c)
Use the option Calc/Probability Distributions/Normal to calculate C6 as the cdf at C5.
Use the value of mu and sigma given by the estimated value in 2(a). C6 will contain
the observed probabilities. The expected probabilities are in C3.
Use the option Graph/Scatterplot/Simple to plot C3 versus C6.
Click on the graph and select the option Add/Calculated Line to add a 45 degree
straight line.
Finally, change the labels of the graph as required. Your final graph should look like
…
Probability Probability Plot
1.0
Expected Probability
0.8
0.6
0.4
0.2
0.0
0.0
0.2
0.4
0.6
Observed Probability
0.8
1.0
Question 2(d)
Highlight C1 and select the option Graph/Histogram to produce the histogram of the
data.
Click on the histogram and select the option Add/Distribution Fit to draw the fitted
normal pdf with mu and sigma given by the valued determined in 2(a).
Finally, change the labels of the graph as required. Your final graph should like …
Histogram with Fitted PDF
Mean
StDev
N
10
Frequency
8
6
4
2
0
-2
-1
0
C1
1
2
-0.0238
1.064
50
Download