E-Code

Geometric distribution: first success — a TI-84 Plus CE program

By E-Code · updated

GEOMPROB is a TI-BASIC program for the TI-84 Plus CE. Chance the first success comes on trial k, by trial k, or after trial k, with the mean and standard deviation of the waiting time.

What it asks for and what it shows

It asks for 2 values at its prompts. In the example below it shows P(X=K), P(X≤K), P(X>K), MEAN, SD.

Example run

One of its oracle test cases: “p .2, first success on trial 3”. The inputs are typed in order, and the results are the values the case expects on the screen.

StepValue
You enter
Input 10.2
Input 23
The screen shows
P(X=K)=0.128
P(X≤K)=0.488
P(X>K)=0.512
MEAN=5
SD=4.472135955

How it's checked

5 test cases, each checked against an independent method. Replayed key by key on a virtual TI-84 Plus CE, they make 31 checks.

How E-Code checks every program

Run it or put it on your calculator

Related programs

All TI-84 Plus CE statistics programs · All TI-84 Plus CE programs