HP Forums
Binomial Distribution Graphing - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: HP Prime (/forum-5.html)
+--- Thread: Binomial Distribution Graphing (/thread-22118.html)



Binomial Distribution Graphing - vesph - 08-03-2024 08:22 AM

Hi all,

I'm a high school student from Australia recently introduced to the HP Prime.
Currently we are studying probability and and the rest of my peers use Casio and Texas Instruments calculators, whilst the Prime, although remarkably fast and a joy to use, does have a program to parametrically graph a binomial distribution (as far as I can tell).

I have been attempting to learn to create my own program to do this, however I have made little progress aside from performing simple callable functions, and am unable to graph anything.

I'd love support and resources to make progress on this; I'm barely familiar with the calculator and most of the resources I've had access to are from the old generation prime.

I find my self way out of my depth here, and getting desperate as I have exams soon and will need this ASAP.

Thanks in advance,
- vesph


RE: Binomial Distribution Graphing - john gustaf stebbins - 08-03-2024 11:26 PM

The Statistics 1Var app has good graphing modes that might work. You can use MAKELIST and BINOMIAL to create the distribution. For example, 5 choices with 0.4 probability can be generated by:

MAKELIST(BINOMIAL(5,0.4,X),X,0,5)

Store this list into one of the app variables (D1 to D0) and then go into the Symb and Plot screens to generate your graph. A bar plot looks pretty good (I couldn't get the image to post here).

There are lots of ways to approach this on the Prime, but this is simple.


RE: Binomial Distribution Graphing - vesph - 08-04-2024 10:58 AM

(08-03-2024 11:26 PM)john gustaf stebbins Wrote:  The Statistics 1Var app has good graphing modes that might work. You can use MAKELIST and BINOMIAL to create the distribution. For example, 5 choices with 0.4 probability can be generated by:

MAKELIST(BINOMIAL(5,0.4,X),X,0,5)

Store this list into one of the app variables (D1 to D0) and then go into the Symb and Plot screens to generate your graph. A bar plot looks pretty good (I couldn't get the image to post here).

There are lots of ways to approach this on the Prime, but this is simple.

Thanks, good to know an approach like that is possible.
It is still too slow of a process as I cannot quickly paste the data down the column, is there a way to automate this process, or another approach entirely?

Thanks,
-vesph


RE: Binomial Distribution Graphing - C.Ret - 08-04-2024 11:15 AM

Hi Prime's friends !

The john gustaf stebbins's explanations are excellent.
Except that it is simpler to generate his example directly into the Statistic 1Var application.

Here is a small step-by-step tutorial that shows how to obtain the bar graph of his example:
[Image: attachment.php?aid=13781]
[Image: attachment.php?aid=13782]
Hope this help a bit.
Any questions or comments are welcome.


RE: Binomial Distribution Graphing - vesph - 08-04-2024 11:53 AM

(08-04-2024 11:15 AM)C.Ret Wrote:  Hi Prime's friends !

The vesph's explanations are excellent.
Except that it is simpler to generate his example directly into the Statistic 1Var application.

Here is a small step-by-step tutorial that shows how to obtain the bar graph of his example:
[Image: attachment.php?aid=13781]
[Image: attachment.php?aid=13782]
Hope this help a bit.
Any questions or comments are welcome.

You are a legend mate, thanks for the help, that's really easy!

Thank you so much, and john gustaf stebbins as well
-vesph


RE: Binomial Distribution Graphing - john gustaf stebbins - 08-04-2024 06:35 PM

It isn't necessary to copy the data number by number. To transfer the list of the distribution to the app use the STO-> command and save it into one of the data variables. For Statistics1Var these are D1, D2, ... , D0. Actually I just did that at the end of the generator function (press shift STO-> and put the variable name D1).

The same thing can be done with the Statistics2Var using the variables C1 to C0.

I use this with programs that generate data. I can then put the data in the app analyze the data in the built in package rather than needing to write my own statistical analysis.