Main content

### Course: Statistics and probability > Unit 9

Lesson 7: Geometric random variables- Geometric random variables introduction
- Binomial vs. geometric random variables
- Probability for a geometric random variable
- Geometric probability
- Cumulative geometric probability (greater than a value)
- Cumulative geometric probability (less than a value)
- TI-84 geometpdf and geometcdf functions
- Cumulative geometric probability
- Proof of expected value of geometric random variable

© 2024 Khan AcademyTerms of usePrivacy PolicyCookie Notice

# TI-84 geometpdf and geometcdf functions

Using a TI-84 (very similar for TI-85 or TI-89) calculator for making calculations regarding geometric random variables.

## Want to join the conversation?

- using scipy.stats:

from scipy.stats import geom

geom.pmf(5,1/13)

geom.cdf(9,1/13)

geom.cdf(12,1/13)(16 votes) - How would I solve a problem that was asking "how many shots until he misses" or "how many card draws until he picks a king"(2 votes)
- You are talking about a geometric distribution (of a geometric variable).

If we are given that someone has a free throw probability of 0.75 (of making it), then we can't know for**sure**when he will miss, but we can calculate the expected value of a geometric value.

Sal derives the expected value of a geometric variable X, as E(x) = 1/p in another video, where p is the probability of success.

So in our case that would be 1/0.75 = 1/(3/4) = 4/3

Of course expected valued as not always integers so this is just in 'theory'. All this means is that if we show until we made it n times, then we expect to throw a total of n*(4/3) shots.

Hope this helps!

- Convenient Colleague(2 votes)

- How would one enter this on Desmos? Or should I just calculate it manually?(2 votes)
- At5:40, Sal says that the approximate answer is 38.3%, but the calculator says 0.382 percent.(1 vote)
- The calculator actually says the
*probability*is 0.3826967067

A probability of 0.383 is 38.3%, just like a probability of 0.5 is 50%(3 votes)

- Can someone clear this up for me.

On the previous lessons of cumulative geometric probabilities for lesser than and greater than. I devised the following definitions to make calculating problems easier.

F = a given event happening assuming a prob. of n

A prob. of a thing occurring in # trials greater than x;

P(F > x) = P(F not happening @ ≤ x) = (1 - n)^x

A prob. of a thing occurring in # trials less than x;

P(F < x) = 1 - P(F not happening @ ≤ x-1) = 1 - (1-n)^x-1

When this lesson came up, I went ahead and tried the questions by hand before the lesson started. I got the correct answers in the same decimal range, but the calculators cumulative function seems to always use the success probability to derive its answer.

I seem to be doing the reverse and cannot find an inverse formula to use the probability of success to find the correct answers.(2 votes)- Your not communication yourself well. Generally speaking n is used for number of trials and p is used for probability and X is the random variable.

So you could say something like X ~ Geo(p).

But what you seem to be referring to is complementary probability.(0 votes)

- I'm very confused. In Excel I'm trying to calculate cumulative geometric probability using the NEGBINOM.DIST function for a question about 15% of emergency room visitors are uninsured. "Find the probability that it takes at least 6 patients until it receives the first uninsured patient." 1 - NEGBINOM.DIST(5,1,0.15,TRUE) does not work, but 1 - =NEGBINOM.DIST(4,1,0.15,TRUE) seems to give the correct answer. Why would 4 work and not 5??(1 vote)
- May i clarify, first part (to get a king within 5 cards) would be 33% instead of 5.6% (this would instead be getting a king in the 5th card pick) correct?(1 vote)
- I was using Matlab to calculate pdf and cdf and it needs different inputs to get the same answers as TI-84 in the video above. And my question is why? For example :

1. To calculate probability of picking less than 10 cards :

y = geopdf(8, 1/13)

y = 0.513

so i need to say that x=8 to get same probability of 0.513 (as in video) be:cause it gives higher probability with x=9

2. What is the probability of picking more than 12 cards :

y=1-geocdf(11,1/13)

y =0.3827

So here i also need to give 1 integer less than the one in question.

Where could these differences come from?

THank you :)(0 votes)- In Matlab, also in R, the function input represents the number of failures before a success, which is kind of more intuitive than the one the calculator used here.

" 8 failures before success" is equivalent to saying "To succeed at the 9th attempt."

To test this, try n=0 with Matlab, which means 0 failures, or success from the 1st attempt.(2 votes)

## Video transcript

- [Instructor] What we're
going to do in this video is learn how to use a graphing calculator, in particular a TI84. If you're using any other TI
Texas Instrument calculator it'll be very similar in
order to answer some questions dealing with geometric random variables. So, here we have a scenario. I keep picking cards from a standard deck until I get a king. So this is a class geometric
random variable here and it's important that
in this parentheses it says I replace the cards
if they are not a king and this important as we
talk about on other videos because the probability of
success each time can't change. And so we could define
some random variable X this is a geometric random
variable as being equal to the number of picks until we get a king. When we replace the cards
if they are not a king. And for this geometric random variable, what's the probability
of success on each trial? Remember what are the
conditions for a geometric random variable is that
probability of success does not change on each trial. Well the probability of
success is going to be equal to there's four kings in a
standard deck of 52, this is the same thing as one over 13. So this first question is
what is the probability that I need to pick five cards? Well this would be the
probability that our geometric random variable X is equal to
five and you could actually figure this out by hand,
but the whole point here is to think about how to
use a calculator and there's a function called geometpdf
which stands for geometric probability distribution
function, where what you have to pass it is the probability
of success on any given trial, one out of 13, and
then the particular value of that random variable
that you want to figure out the probability for, so
five right over there. Now just to be clear, if
you're doing this on an AP exam and this is one of the reasons
why a calculator is useful, you can use this on an AP
exam, AP statistics exam. It's important to tell the
graders if you're doing it on the free response that
this right over here is your P and that this right over
here is your five just so it's very clear that where you
actually got this information from or why you're actually typing it in. But let's just see how it
works, what this probability is actually going to amount to. Alright so I have my calculator
now and I just need to type in geometpdf and then those parameters. And so the place where I
find that function I press 2nd, distribution right over
here, it's a little above the vars button. And then I click up, I can
scroll down or I could just go to the bottom of the list
and you can see the second from the bottom is
geometpdf, click Enter there. My P value, my probability
of success on each trial is one out of 13, and I want
to figure out the probability that I have to pick five cards. And so then click Enter,
click Enter again, and there you have it, it's about 0.056. So this is approximately 0.056. Now let's answer another
question, so here they say what is the probability that
I need to pick less than 10 cards? So this is the probability
that X is less than 10 or I could say this is equal
to the probability that X is less than or equal to nine. And I could say well this
is the probability that X is equal to one plus the
probability that X is equal to two all the way to the probability
that X is equal to nine. But that would take a
while, even if I used this function right over here. But lucky for us, there's
a cumulative distribution function, take some space
from the next question, this is going to be equal
to geometcdf, cumulative distribution function and once
again I pass the probability of success on any trial and
then up to including nine. So let's get the calculator out again. So we go to 2nd, distribution,
I click up and there we have it geomet cumulative
distribution function, press Enter, one out of 13 chance
of success on any trial. Up to and including nine, and then Enter. And there you have it, it's
approximately 51.3% or 0.513. So this is approximately 0.513. Now let's do one more. What is the probability that
I need to pick more than 12 cards? And like I'll pause the video
and see if you can figure this one out, what function
would I use on my calculator, how would I set it up? Well the probability, this
is the probability that X is going to be greater than
12, which is equal to one minus the probably that x
is less than or equal to 12. And now this we could just use
the cumulative distribution function again, so this
is one minus geometcdf cumulative distribution
function, cdf, of one over 13 and up to and including 12. So what is this going to be equal to? So 2nd, distribution, I click
up, I get to the function. Click Enter, and so I
already have that first, the probability of success on
every trial is one over 13, and then cumulative up to
12 and so I click Enter. And then well I could click
Enter there, but I really want to get one minus this
value, so I can do one minus 2nd Answer, which would be
just one minus that value, which will be equal to there
you have it, it's about 38.3% or 0.383. So this is approximately
equal to 0.383 and we're done.