954,173 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

TI-83 Program


EriCartman13
Could you add a TI BASIC under you programming section?

cscgal
Administrator

We have an "Other Languages" section (which includes a BASIC subforum)
for less common languages. If we see a large number of threads related
to a particular language within this forum, a new subforum will be
created as needed.

Could not find "other Languages"
Hope this is the right forum.
Would appreciate any comments, suggestions or improvements on the code,
presentation, layout, etc.
Thank You
falcon

Outline:
Line 1. Clear
Line 2 - 7. Instructions
Line 12 - 15. Lbl D - input data
Line 17 - 20. Lbl L - input list
Line 22 - 25. calculator built-in formula [dim( and sum( ]. L1² squares X.
Line 26 - 28. formula for mean, variance & standard deviation
Line 30 - 42. Lbl X - display
Line 36. fix 4
Line 44. clear fix 4 (line 36)

prgmSTDEVFRM
Line	 Command or Statement	 Comments
   1.	 ClrHome	 Clear Screen
   2.	 Output(1,1,"SELECT LIST OR	 Instructions
   3.	 Output(2,1,"DATA TO BEGIN -	        |
   4.	 Output(3,1,"USE COMMAS BTWN	        |
   5.	 Output(4,1,"NUMBERS IN LIST	        |
   6.	 Output(5,1,"ENTER n, Σx, Σx²	        |
   7.	 Output(6,1,"FOR DATA	 End Instructions
   8.	 Pause	 
   9.	 ClrHome	 
 10.	 Float	 
 11.	 Menu("STD DEV","LIST",L,"DATA",D	 
 12.	 Lbl D	 Input Data
 13.	 Input "n =",N	 n = sample size
 14.	 Input "Σx =",B	 Σx = sumX
 15.	 Input "Σx² =",Y	 Σx² = sumXsquared
 16.	 Goto X	 
 17.	 Lbl L	 Input List 1
 18.	 Disp "DATA LIST	 
 19.	 Input "L1=",Str1	 
 20.	 expr("{"+Str1->L1	 
 21.	 ClrHome	 clear screen - calculations
 22.	 dim(L1->N	 n       dim(  calculator formula
 23.	 sum(L1->B	 Σx;    sum(  calculator formula
 24.	 sum(L1²->Y	 Σx²    sum(  calculator formula
 25.	 Lbl X	 formula calculations & display
 26.	 B/N ->C	 calculates mean    x
 27.	 ((Y - ((B) ²/N))/(N - 1)) ->V	 calculates variance
 28.	 √(V) -> S	 standard deviation
 29.	 ClrHome	 Clear screen - display
 30.	 Disp "n =	 
 31.	 Output(1,4,N	 display n
 32.	 Disp "Σx =	 
 33.	 Output(2,5,B	 display Σx
 34.	 Disp "Σx ² =	 
 35.	 Output(3,6,Y	 display Σx ²
 36.	 Fix 4	 set decimal to 4 places
 37.	 Disp "x =	 
 38.	 Output(4,4,C	 display mean (x)
 39.	 Disp "S² =	 
 40.	 Output(5,5,V	 display variance (S²)
 41.	 Disp "S =	 
 42.	 Output(6,4,S	 display standard deviation (S)
 43.	 Pause	 
 44.	 Float	 clear fix 4 (line 36)
 45.	 ClrHome	 
 
Example:
List: 25, 24, 23, 22, 20, 18, 17, 16, 14, 10, 8
Data: n = 11,  Σx = 197,  Σx² = 3843 
Answers: n = 11,  Σx = 197,  Σx² = 3843,  x = 17.9091,  S² = 31.4909,  S = 5.6117
 
Example:
List: 13, 12, 11, 11, 10, 9, 9, 9, 6, 4
Data: n = 10,  Σx = 94,  Σx² = 950 
Answers: n = 10,  Σx = 94,  Σx² = 950,  x = 9.4000,  S² = 7.3778,  S = 2.7162
 
Reference:
Commands:
ClrHome   clears home screen
dim(   returns the dimension (number of elements) of list
Disp   displays text or value specified
expr(   converts string to an expression
Fix   sets fixed-decimal mode for number of decimal places
Float   sets floating decimal mode. Displays decimal with no trailing zeros
Goto   goes to label specified. Goto requires a line label be implemented as a destination
Input   prompts for value to store to variable. Requires user input through keypad.
Lbl   creates a label of one or two characters
Menu   generates a menu of up to seven items
Output(row, column)   displays text or value beginning at specified row and column
Str# (# is number)   String: A sequence of characters is called a string
sum(   returns the sum of elements in list
navyfalcon
Newbie Poster
11 posts since Sep 2007
Reputation Points: 10
Solved Threads: 0
 

OH GOD OH GOD OH GOD OH GOD OH GOD.

Now I remember why I got an HP-49G.

sarehu
Posting Whiz in Training
289 posts since Oct 2007
Reputation Points: 98
Solved Threads: 22
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You