HP28S: Computing summary statistics? « Next Oldest | Next Newest »

 ▼ Gary E. RAFE, Ph.D. Unregistered Posts: 1 Threads: 1 Joined: Jan 1970 03-26-2003, 07:04 PM I have a student in my Engineering Statistics course who has an HP28S. We're at the point where we're doing Linear Regression from two lists. We see that his 28S will compute the regression estimates, but we're trying to figure out a not-too-difficult way to get the various summary statistics (sum x, sum y, sum x^2, sum y^2, and sum x*y). The user manual doesn't even hint at how these might be obtained. Pointers as to how this can be done (easily?) on the 28S are appreciated ! ▼ James M. Prange (Michigan) Unregistered Posts: 1,041 Threads: 15 Joined: Jan 2005 03-27-2003, 01:25 AM All of this assumes that you're using the calculator's statistics matrix of course. Try the Owner's Manual, Chapter 28 "Programming Examples", "Summary Statistics" pages 262-269. The programs listed there should get you the sum of squares and sum of products values. For the sum of a column, just use the TOT command to get a vector containing the sum of each column, and the GET command to extract the value for whichever column you're interested in. It should be rather trivial to write a program that uses SumPAR (where Sum represents upper case Greek sigma) to determine which column is x and which one y. Also see "Median of Statistics Data" pages 270-275. Check out anything in the Owner's Manual or Reference Manual that has anything to do with either statistics or arrays. Of course, using summary statistics methods, there's a greater likelihood that information will be lost due to rounding off, especially in the sum of squares and sum of products. Back in the days when we did this on paper or with calculators that used summary statistics methods, we used what we referred to as "encoded data". Instead of using the actual data, we used the difference from some set value (typically, but not always, the most significant digits that were the same for all of the data), multiplied by whatever power of 10 gave us whole numbers to work with. For example, if the input data were 12.3453, 12.3404, and 12.3429, then the algorithm for obtaining the encoded value could be to subtract 12.34 and then multiply that result by 10000, giving us 53, 4, and 29 to work with. After computing our statistical results, we would decode them back; in the above example, we might find the mean of the encoded data to be (approximately) 29 which we divided by 10000 and then added to 12.34 to obtain the result of 12.3429. Even for calculators that keep all of the data in a matrix, I often find it easier to enter the data in "encoded" form (it's easy enough to do the encoding in my head), and then multiply a column by a power of 10 and add a constant to the column. This saves a lot of repetitive keystrokes. Regards,James

 Possibly Related Threads… Thread Author Replies Views Last Post Computing pi with the PC-1300S Kiyoshi Akima 0 1,111 11-17-2013, 12:24 AM Last Post: Kiyoshi Akima weird statistics bug in wp34s Andrew Nikitin 5 2,133 06-20-2013, 01:54 PM Last Post: Namir HP 10s+ Easter Egg (Statistics) Eddie W. Shore 1 949 04-11-2013, 04:25 PM Last Post: Andrew Feist Books on computing Elementary Functions Nick_S 4 1,631 09-14-2012, 07:33 AM Last Post: David Hayden WP34s Stopwatch & statistics pascal_meheut 4 1,710 06-14-2012, 09:04 PM Last Post: Matthew Krotzer WP34s Stopwatch & statistics, message for Matthew Krotzer pascal_meheut 2 1,390 05-23-2012, 03:30 PM Last Post: pascal_meheut Summary: Normal CDF and quantile function Dieter 3 1,422 05-13-2012, 02:20 AM Last Post: Paul Dale HP28S screen noise generator Keith Midson 7 2,469 02-19-2012, 05:35 PM Last Post: Gilles Carpentier HP28S battery door trouble David Griffith 23 6,092 02-08-2012, 08:24 AM Last Post: Neil Hamilton (Ottawa) HP28S - made in Indonesia? Keith Midson 1 938 11-01-2010, 08:06 AM Last Post: Jeff O.

Forum Jump: