
08/17/2009, 08:29 PM
#204
Sorry, this is going to be long. Here are the results of running the statistical function examples from the HP15C manual, p4757.
Executive Summary:
1.0b21 generally passes with flying colors, with some discussion around the Sx and Sy results, where 1.0B21 is calculating a different statistic than a HP15C does  not wrong, but probably the less appropriate choice for most uses.
Details:
Example 1 keystrokes: 5 enter 3 Py,x
HP11C: 60
1.0b21: 60
conclusion: correct result
Example 2 keystrokes: 52 enter 4 Cx,y
HP11C: 270725
1.0b21: 270725
conclusion: correct result
(skipped the random number example, don't think my 11C has a RAN# function)
Example 4, grain yield vs. nitrogen applied, many keystrokes).
HP11C results (I just learned that the 11C uses different registers than the 15C to store stat results, so we're hitting different RCL numbers in the two results):
RCL 1 (sum of x values): 200.00
RCL 2 (sum of squared x values): 12000.00
RCL 3 (sum of y values): 31.01
RCL 4 (sum of squared y values): 200.49
RCL 5(sum of xy products): 1415.00
1.0b21 results:
RCL 3 (sum of x values): 200
RCL 4 (sum of squared x values): 12000
RCL 5 (sum of y values): 31.01
RCL 6 (sum of squared y values): 200.4899
RCL 7 (sum of xy products): 1415
conclusion: taking different register use into account, correct result
Example 5: keystrokes: 4.78 enter 20 sigma 5.78 enter 20 sigma plus
HP11C results:
X = 5
RCL 3 (corrected sum of y values) 32.01
1.0B21 results
X = 5
RCL 5(corrected sum of y values) 32.01
conclusion: taking different register use into account, correct result
Example 6: mean
HP11C
xbar: 40
ybar: 6.40
1.0b21
xbar: 40
ybar: 6.402
conclusion: correct result
Example 7: standard deviation
HP11C
Sx: 31.62
Sy: 1.24
Sx: 28.284
Sy: 1.1065
Conclusion: discrepency between the two calculators.
Discussion: p53 of the HP15C manual points out that the s function calculates an estimate of the population standard deviation from sample data, i.e. this is the SAMPLE standard deviation. If the data entered constitutes the entire population, you can correct the calculated value by multiplying by sqrt((n1)/n) to get the population standard deviation (which is generally represented with a lower case sigma, not the letter "s").
In this example, n=5 so the correction is sqrt(4/5) = 0.89. Multiplying the HP11C results by this number gives the 1.0b21 results. Bingo!
So, which result set is right? Well, that depends on what the numbers you're entering represent. Any experiment I've ever done, the sample standard deviation "s" is the right one, and it is the correct one for the grain yield vs. nitrogen used example. You only calculate sigma if you literally have covered all possible inputs to the experiments, which in the case of real number variables, isn't possible.
Note that if you collect a LOT of data so that n is large, s approaches little sigma asymptotically, since the correction goes to 1. That's what I was vaguely trying to remember about small vs. large data sets from ohsolong ago when I had a statistics class.
Example 8: linear regression:
HP11C
yintercept: 4.86
slope: 0.04
1.0b21
yintercept: 4.856
slope: 0.03865
Conclusion: correct result
Example 9: linear estimation and correlation coefficient
HP11C
predicted yield for 70 tons nitrogen: 7.56
r: 0.99
1.0b21
predicted yield for 70 tons nitrogen: 7.5615
r: 0.98795
Conclusion: correct result


