How do you do an equation using a definite and indefinite loop?? How many cards must you draw from a


How do you do an equation using a definite and indefinite loop?? How many cards must you draw from a deck of 52 cards to have at least a 50% chance of getting two aces I have the answer! I like sharing equations with others. If you have any please share. Is there someone out there in equation land that can help me?Here is my original equation exactly as I put it into the equation solver:
(Probability in n draws)
P=12x(N-1)x(FACT(#)/FACT(#-(N-2)))/(FACT(##)/FACT(##-N))x100 I have tested it and it works perfectly For using 52 cards and drawing e.g. two aces this is the equation formula: Probability in n draws = 12(n-1)*P(48,n-2)/P(52,n) Therefore(12 is a constant) (-1 is a constant) & (-2 is a constant) (N=number of cards drawn from the deck without replacement) (#=48) (##=52) Therefore P N # ## are the variables
If N=2 P=.45 next N=3 P=.87 next N=4 P=1.25 add up all the P's=2.75 Now using a loop variable I want to add N=2 to N=30 the answer should be 80.2 (Please teach me how to create a definite and indefinite loop its on page 25 of Technical Applications HP-27S & HP-19B my problem is I don't understand the equation example. But, If you use MY equation example I will be in a position to understand.)
I know that by using the GET function e.g. P=G(P)+2x(N-1)x(FACT(#)/FACT(#-(N-2)))/(FACT(##)/FACT(##-N))x100 All I have to do is keep entering N=2 then N=3 etc. My objective is to learn how to use the syntax of the equation solver. Please help if you can. Thanks.
By the way My orginial equation can be slightly modified for using 104 cards (2 decks)The equation formula:Probability in n draws = 2(n-1) x
P(102,n-2)/P(104,n)e.g.Probability in n draws to get e.g. two queens of spades. Probability in n draws = 2(n-1)*P(102,n-2)/P(104,n) the only constant that needs changing is 12 to a 2.Therefore P N # ## are the same variables in this case (#=102) (##=104)
I'm using a HP-17BII


Michael, to solve your birthday paradox problem, you may want to try this universal formula:
BD=1-EXP(S(I:1:Y:1:LN(((X+1)-I)/X))), where S is Sigma, Y=23, and X=365. This formula also applies to roulette wheels, etc. However, if you' solving a problem like the Lotto, let's say with 48 total numbers and 6 draws, you can use this formula:
PR=(COMB(R:M)*COMB(B:(K-M))/(COMB((R+B):M))), where R=the total number of red balls, B=total number of balls minus number of red balls, K=the number of balls drawn and M= the target number of red. For example, if, like in the MO Lotto the number of balls is 48, to find the odds of getting 6 out of 6 would be entered as follows:
K=48, R=6, M=6, B=42. The odds then calculates to 12,271,512. Go to If you need help, e-mail me. Good luck. Jim K


Please, please write the formulas into seperate lines (Press enter once more).

If you write your text like this post, everything gets completely unreadable.



In response to Reinhard Hawel's 25 May request to put equations on one line:
Birthday paradox=

BD = 1-EXP(S(I:1:Y:1:LN(((X+1)-I)/X)))

The equation above yields a probability of .507 for 23 people in a group.

The equation for drawing without replacement, e.g., in a lottery:

PR = (COMB(R:M)*COMB(B:(R-M))/(COMB((R+B):)))

Hope this helps. Jim Kimes


Hi Jim,
Thanks for this universal formula:
How does this formula apply to roulette wheels. Please give me a couple of examples. What other thing does this formula apply to?


HI Everyone is there anyone out there who can make up a simple equation to show me an example of how to do a definite and indefinite loop its on page 25 of Technical Applications HP-27S & HP-19B my problem is I don't understand the equation example? I'm sure some math savvy person has the ability to teach me this.

Possibly Related Threads...
Thread Author Replies Views Last Post
  hp-41 Cards Marcel Samek 8 2,513 11-07-2013, 11:13 PM
Last Post: Garth Wilson
  Equation Library/App for the Prime Harold A Climer 3 1,304 10-30-2013, 10:14 AM
Last Post: CompSystems
  Equation Library on the PRIME Harold A Climer 0 788 10-26-2013, 10:01 AM
Last Post: Harold A Climer
  Draw with your finger on HP Prime ! Mic 5 1,617 10-23-2013, 10:00 AM
Last Post: CompSystems
  HP Prime - One thing I can not draw in advanced graphing dg1969 2 1,012 10-19-2013, 02:00 PM
Last Post: dg1969
  WP34s integration trapped in infinite loop Bernd Grubert 25 4,884 10-17-2013, 08:50 AM
Last Post: Dieter
  Meltiple Equation Solver PRIME Vs. HP 50G Harold A Climer 5 1,358 10-07-2013, 05:11 PM
Last Post: CR Haeger
  EOT--TI N-Spire Equation Limit Matt Agajanian 2 996 09-22-2013, 12:37 PM
Last Post: Matt Agajanian
  Does Prime Have a Multiple Equation Solver? Norman Dziedzic 2 997 09-20-2013, 09:43 AM
Last Post: Norman Dziedzic
  Equation of the parabola given three points Gerson W. Barbosa 27 4,920 09-18-2013, 01:58 PM
Last Post: Gerson W. Barbosa

Forum Jump: