HP Forums

Full Version: How do you do an equation using a definite and indefinite loop?? How many cards must you draw from a
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

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
Regards,
Michael

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 www.molottery.state.mo.us/newspage/resource/pbodds. 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.

Thanks

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:
BD=1-EXP(S(I:1:Y:1:LN(((X+1)-I)/X)))
How does this formula apply to roulette wheels. Please give me a couple of examples. What other thing does this formula apply to?
Regards,
Mike

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.