# # canola - canon canola 1614p emulator # Copyright (C) 2011 Peter Miller # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License, version 3, as # published by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program. If not, see . # ; ------------------ Card-Pocket-Begin ----------------------------------- ; Title: ST-1: Mean, Variance, Standard Deviation ; Color: green ; Style: blank ; ------------------ Card-Pocket-End ------------------------------------- ; ; How-to-Operate: ; [START] ; x1 [START] ; x2 [START] ; x3 [START] ; ... ; xn [START] ; [START] => mean ; variance ; standard deviation ; ; Example: ; [START] ; 25 [START] ; 26 [START] ; 27 [START] ; [START] => 26.00000 ; 0.66667 ; 0.81649 ; ; Equations: ; bar(x) = (sigma x) over n ; s**2 = sigma((x - bar(x))**2) over n ; CM14 ; sigma(x) CM13 ; sigma(x**2) CM12 ; n ENT ; xn FJ $610 M14 * += M13 1 M12 RM12 EJ $610 ; if you enter a new number, it jumps ; if you only press [START], it falls through RM14 / RM12 ROUND 5 += PRINT ; mean RM14 * += / RM12 -= M13 RM13 / RM12 ROUND 5 += PRINT ; variance ROUND 5 SQRT PRINT ; standard deviation