7000G Retro Month - June 19 Edition
Introduction
Welcome to the 7000G Retro Month, which features programming for the classic Casio calculators from the mid/late 1980s: primarily fx-7000G and fx-7500G. Since the programming language stays similar throughout the years, programs can be translated to the fx-6300G and later graphing calculators with little to no adjustments. Non graphic programs should be ported to the fx-4000P, fx-4500P (A), fx-3650p (II), fx-50F Plus (II), and fx-5800P with little to no adjustments.
7000G Retro Month takes place every Saturday during June 2021.
To make text easier to type, I can going to use the following text friendly symbols for the following:
-> for →
/I for ⊿
=> for ⇒
What do you think? Unicode or simple text equivalents?
- - - - - - -- - -- - -
Today's subject revolves around Probability and Random Numbers. Enjoy!
- - - -- - - -- - -- -- -
Random Integers: Repeats Allowed
This program allows the user to generate a number of integers between A and B, repeats are allowed. Each integer is displayed one at a time.
"A"? -> A
"B"? -> B
"N"? -> N
Lbl 1
Int ((B-A+1) Rnd#) /I
Dsz N
Goto 1
Combinatorics
The program allows the user to choose between three options:
1. PERM: permutation: nPr
2. COMB: combination: nCr
3. COMB REPLACE: combination with replacements allowed (n+r-1)Cr
"N"? -> N
"R"? -> R
"1. PERM"
"2. COMB"
"3. COMB REPLACE"
? -> K
K=1 => N!÷(N-R)! -> X
K=2 => N!÷(R!(N-R)!) -> X
K=3 => (N+R-1)!÷(R!(N-1)!) -> X
X
Binomial Distribution
This program calculates the sum of probabilities for a binomial distribution:
total probability = ∑( nCr(N,K) p^K (1-p)^(N-K), K=A to B)
Probability: 0 < p < 1
"A"? -> A : "B"? -> B
"N"? -> N : "P"? -> P
0 -> M : Lbl 1
M+(N!×P^A×(1-P)^(N-A))÷(A!(N-A)!) -> M
A+1 -> A
A>B => Goto 2
Goto 1
Lbl 2
M
Confidence Interval
This program generates a confidence interval using one of four probabilities are assigned to the following variables:
F: 99% (z* ≈ 2.576)
G: 98% (z* ≈ 2.326)
H: 95% (z* ≈ 1.96)
I: 90% (z* ≈ 1.645)
interval = mean ± z* × variance / √n
"CONF INTERVAL"
2.576 -> F
2.326 -> G
1.96 -> H
1.645 -> I
"MEAN"? -> A
"VAR"? -> B
"N"? -> N
"F=.99, G=.98"
"H=.95, I=.90"
? -> J
A-JB÷√N -> E /I
A+JB÷√N -> F
E: low, F: high
Eddie
All original content copyright, © 2011-2021. Edward Shore. Unauthorized use and/or unauthorized distribution for commercial purposes without express and written permission from the author is strictly prohibited. This blog entry may be distributed for noncommercial purposes, provided that full credit is given to the author.