Probability Concepts & HP17BII limitations « Next Oldest | Next Newest »

 ▼ Michael Burns Junior Member Posts: 24 Threads: 5 Joined: Jan 1970 04-23-2001, 07:42 PM Hi! I'm interested in two particular concepts of probability. I found these concepts in a book by John Allan Paulos "Innumeracy". Concept #1. How many random people must be in a room to have a 50% chance of two people having the exact same birthday. Let specify this before hand as being April 20th. Below Concepts #1 are my examples ? (364/365)^253x100=49.95%-1=50.05% Therefore; the answer is 253. You have two decks of playing cards=104. How many cards must you draw at random to have a 50% chance of getting two Ace's of Hearts. (103/104)^72x100=49.87-1=50.13% Final example. You have one deck of cards=52 How many cards must you draw at random to have a 50% chance of getting two Ten's? First you have to know what the chances are of not getting it. As was done in the first two examples. Therefore: (49/52)^12x100=49.01%-1=50.99% Concept #2. How many random people must be in a room to have a 50% chance of any two people having an unspecified exact same birthday? (n!/[n-k]!)/(n^k) (365!/[365-23]!)/365^23=.493-1*100=50.73% Therefore; the answer is 23 You have two decks of playing cards=104. How many cards must you draw at random to have a 50% chance any two unspecified cards matching exactly (104!/[104-13]!)/104^13=.4575-1*100=54.25% Therefore; the answer is 13 You have one deck of cards=52 How many cards must you draw at random to have a 50% chance of any two unspecified face, number, or suit cards matching? (49/[49-7]!)/52^7=.4211*100=57.89% Therefore; the answer is 7. For a suit (40/[40-3]!)/52^3=1-.4216x100=57.84% Therefore; the answer is 57.84%. Finally Re: n!/(n-k)! I know this is a shortcut to factorial a number down to a specific amount e.g. 365*364*363*........343 I can put this equation into my HP17BII but the highest number it will do is 253. Is there another equation I can use as a shortcut due to the limitation of my calculator? . Is there a book you can recommend with probability questions & answers & equations that can be used in every day life situations? Any help you can offer will be appreciated. Thanks! Regards, Michael Burns ▼ Rich Junior Member Posts: 7 Threads: 2 Joined: Jan 1970 04-23-2001, 08:10 PM He's baaaaack!!! :-) ▼ Michael Burns Junior Member Posts: 24 Threads: 5 Joined: Jan 1970 04-24-2001, 08:12 PM Yes I'm really baaaack! but I failed to state that based on these two concepts are my other two examples right In each case? Anybody out there know if all four of my examples are right am I missing something? Thanks ▼ Rich Junior Member Posts: 7 Threads: 2 Joined: Jan 1970 04-24-2001, 09:37 PM We're glad you're baaaaack! Your messages alway bring a chuckle. :) Seriously, I don't know if concepts are correct or not. We need someone with more math background than me! ▼ Michael Burns Junior Member Posts: 24 Threads: 5 Joined: Jan 1970 04-25-2001, 05:59 PM Hi Rich Thanks for welcoming me back I'm sure about the two concepts and I think my 1st examples are right but, I would really like to verify if my 2nd examples are correct since I made them up myself. I hope some bright person out there can confirm if I understand both concepts correctly by use of the examples given Juan J Member Posts: 195 Threads: 25 Joined: Jul 2005 04-24-2001, 08:12 PM What about Stirling's approximation? For large numbers the error is about 10%. ▼ Michael Burns Junior Member Posts: 24 Threads: 5 Joined: Jan 1970 04-24-2001, 08:18 PM Hi Juan J Could you please explain Stirling's approximation? For large numbers the error is about 10% I have no idea what this means.Thanks ▼ Juan J Member Posts: 195 Threads: 25 Joined: Jul 2005 04-25-2001, 11:42 AM Michael: Stirling's approximation is a method to estimate the factorials of large numbers. As you know, n! is defined as n!=n(n-1)(n-2)...3*2*1 but this is often unpractical for large numbers. So Stirling came up with an approximation: ln(n!)=((0.5)*ln(2*pi))+((0.5)*ln(n))+(n*ln(n))-n When comparing results, the difference (i. e., error) is about 10%. For your example, the above equation yields 1790, so the factorial you are looking for is equal to exp(1790). Still out of range for a calculator, but a solid number to work with. The approximation can be keyed into the Equation Solver. Worked in my 48s and 28, and will surely work in a 17B and 19B. Regards, ▼ Michael Burns Junior Member Posts: 24 Threads: 5 Joined: Jan 1970 04-25-2001, 06:57 PM Juan J: Re: ln(n!)=((0.5)*ln(2*pi))+((0.5)*ln(n))+(n*ln(n))-n If you let n=365 I got 48,694,519.18 Here is what I put in my problem solver ANS=((.5xnx(2xpi))+((.5xnx(n))+(nxnx(n))-n) I had to put a ) at the end otherwise it would be an invalid equation in my HP17ii Please let me know where I went wrong. Your help is much appreciated. Thanks ▼ Juan J Member Posts: 195 Threads: 25 Joined: Jul 2005 04-25-2001, 07:43 PM Michael: Your expression, ANS=((.5xnx(2xpi))+((.5xnx(n))+(nxnx(n))-n), seems to have missing natural logarithm operators. Note that the formula should be something like this: ANS=((.5xLN(2xpi)))+((.5xLN(n))+(nxLN(n))-n). I assumed "ln()" would read as "LN()". This corrections should make your formula work. A brief but good discussion on factorials properties, including the above formula, can be found in Appendix C of "Thermodynamics, Kinetic Theory and Statistical Thermodynamics," by Francis W. Sears and Gerard L. Salinger, pubblished by Addison Wesley Publ. Co., Inc. Give it a try. Regards, Juan ▼ Michael Burns Junior Member Posts: 24 Threads: 5 Joined: Jan 1970 04-28-2001, 06:51 PM Juan I'm going to check the library re:Thermodynamics, Kinetic Theory and Statistical Thermodynamics," but I,m still having a problem I let n=365 ANS=1790 I solved for LN and it came out .0162 So the equation works. How do you know what to put in for LN ? What do you mean by this "The approximation can be keyed into the Equation Solver. Worked in my 48s and 28, and will surely work in a 17B and 19B"? Thanks again for your help. Regards Michael ▼ Juan J Member Posts: 195 Threads: 25 Joined: Jul 2005 04-30-2001, 07:07 PM Michael: Your calculator must have a natural logarithm function. It is usually spelled as LN() on most HPs. Naturally, its inverse function is exp(), usually spelled EXP(). The formula has a couple of logarithms. The result is the logarithm of the factorial, LN(n!), so the factorial is equal to the exponent of the result. Both functios should be in the same menu on your calculator. The Equation Solver is the equation solving utility of the 48 series. I guess it has the same name on your 17B. Again, the formula in your calculator should look like this: ANS=((0.5*LN(2*PI))+(0.5*LN(N))+(N*LN(N))-N) Regards, Juan ▼ Michael Burns Junior Member Posts: 24 Threads: 5 Joined: Jan 1970 05-01-2001, 07:45 PM Hi Juan I'm not as math savvy as you. I'm lucky I got through Algebra. I now successfully put in the equation and it works ANS=((0.5*LN(2*PI))+(0.5*LN(N))+(N*LN(N))-N I needed it spelled out exactly. Ans=1792.33 I'll have to read up on logarithms. Now that I got this far I'm not sure what I do next? If your in the mood to teach me more I'm a willing student. Thanks for all your help so far. Regards, Michael ▼ Juan J Member Posts: 195 Threads: 25 Joined: Jul 2005 05-02-2001, 10:02 PM Michael: Going thru algebra with not-so-much success is not a thing to be ashamed of. I hated algebra too. But math is not so dreary, really. If only there would be more good teachers out there... Ok. A logarithm is a number to which another number, referred to as base, is raised to obtain a given result. Any number can be used as a base, but for the sake of simplicity, two numbers are commonly used: 10 and e (which equals to 2.718283.) Since logarithms are powers, the algebraic rules that apply to powers apply to logarithms as well. This enables us to apply logarithms to multiplications. Say we have A*B. If we take the logarithm of this, it would be LN(A*B). This can be further split into LN(A)+LN(B). The logarithm of the product is therefore the sum of the factors logarithms. Then we want to know how much is A*B. For this we find the antilogarithm of LN(A*B). Same thing with Stirling's formula. It provides LN(N!), so N! is the antlogarithm of it. I've oversimplified this matter for a quick explanation. Drop me an e-mail for a more comprehensive one. Regards, Juan ▼ Michael Burns Junior Member Posts: 24 Threads: 5 Joined: Jan 1970 05-03-2001, 08:19 PM Juan check your email. Please. If you want to respond on this web site instead that's OK I like comming Here Chris Randle (UK) Member Posts: 136 Threads: 22 Joined: Aug 2010 05-03-2001, 06:01 PM Michael, You sound like me. Not a maths whizz, but you enjoy learning more. I really love this site: http://forum.swarthmore.edu/dr.math/ I'm sure you'll find answers to most of your questions there, with explanations aimed at the layman. Chris ▼ Mike Burns Junior Member Posts: 12 Threads: 4 Joined: Jan 1970 05-03-2001, 07:44 PM Chris, I have made four attempts at getting a response to my question on this web site since April 17TH I have yet to get a response. If you find another web site let me know please . Since I got my HP17BII math has become much more interesting to me. I have the equation for wind-chill factor and always on the out look for new equations that I can incorporate into my calculator. If you want to share useful equations with me let me know. ▼ Chris Randle (UK) Member Posts: 136 Threads: 22 Joined: Aug 2010 05-04-2001, 03:56 PM Mike, I didn't answer your question to me a while back about further explanations of probabilities because my knowledge stops at simple things like permutations and combinations. Did you look at the Dr Math site? I can't believe you want more links. There's enough there to keep most people busy for the rest of their lives! It is composed of three major "sections". One is a home-grown explanation of a particular topic. Two is loads of links to other sites covering that topic. Three is a (searchable) forum of questions and answers on that topic. The "level" starts at primary school and goes up to stuff that makes my head swim (secondary school?!!). I end up reading there for hours once I start. For probability stuff, start here: http://forum.swarthmore.edu/dr.math/faq/faq.prob.intro.html and then just follow your nose! However, if you want solver equations but don't know how to write them, then that is a pity. One of the beautiful things about a solver is that you don't need a program written by someone else, you just "translate" an equation from a book or web site. Perhaps someone else has a reference to help you to learn how to get the most from your solver? My favourite solver is on my 200LX. You just type in the equation as you see it and off it goes. ▼ Michael Burns Junior Member Posts: 24 Threads: 5 Joined: Jan 1970 05-04-2001, 09:27 PM Thanks Chris I'll go back to http://forum.swarthmore.edu/dr.math/faq/faq.prob.intro.html and ckeck it out more thoroughly. I noticed on some of their explanations that sometimes they don't give enough information or skip a step and find it frustrating. I'm more interested in the process than the actual answers. I like to pick up on a concept and make up my own examples to ensure I understand it. Regards, Michael from Canada Michael Burns Junior Member Posts: 24 Threads: 5 Joined: Jan 1970 05-04-2001, 09:33 PM Hi Chris Re:My favourite solver is on my 200LX. You just type in the equation as you see it and off it goes. I'll have to see if its available in Canada. Thanks for the tip. ▼ Chris Randle (UK) Member Posts: 136 Threads: 22 Joined: Aug 2010 05-05-2001, 09:22 AM Mike, Unless Canada is even more blessed than it appears to be, you'll find that the 200LX was discontinued in Nov '00. They are available used, but tend to command quite high prices, such as US\$ 400. For that you get a PIM and DOS based PC and a calculator very simililar to a 19BII albeit with a bigger screen. Having said that, there's a thread here about 42S vs 48G+ where Ron Ross describes the 17BII's solver as sounding (to me) quite like the 200's, so it's probably not worth it. Using the 42's solver, for example, is not as simple as typing in an equation, but it's not rocket science either. I've never seen a 17BII so I don't know the solver. If, for example, somebody showed you the physics equation for distance (s)in terms of initial velocity (u), time (t) and acceleration (a) as 's=u*t+(a*t^2)/2' would you know how to put that into your solver? If not, perhaps you could start another thread asking for resources to learn how to use it. Is the manual any good on that subject? Once you're happy "programming" the solver, it opens up all sorts of avenues of exploration in maths and physics. ▼ Ron Ross Senior Member Posts: 673 Threads: 20 Joined: Oct 2008 05-06-2001, 08:44 PM Nice of you to reference my message. The solver on your 200LX is identical to the solver released by the 19bII and thus is 99% similiar to the 17 bII solver. The other 1% is lack of trig functions and no trig functions to use in the solver of the 17. In fact the calculator mode of the 200Lx explains that it is a 19 bII calculator with the ability to integrate into the lotus 123. The 200 Lx is a great all around system. The look and feel of the 17 is identical to the 200 LX otherwise (aside from having to use softkeys to key in alpha charators, but the 17 B is a calculator and not a 200Lx). Chris Randle (UK) Member Posts: 136 Threads: 22 Joined: Aug 2010 04-25-2001, 09:13 PM Michael, I'm not familiar with the 17BII, but I thought about how you might solve this on the 200LX or 42S (two HPs that I do have) and it may give you some ideas. As you rightly point out n!/(n-k)! can be expanded to n*(n-1)*(n-2)*...*(n-k+1). In your 365 and 23 example, it's 365*364*...*343. You might be able to program the calculator to perform this function and thus solve for values of n far higher than your calculator can return factorials. I'm ignoring the fact that both calculators have a perm function that returns a permutation of k items from n items, which is what the above expression calculates. If the 17BII has one then your problem's solved. Both machines return ~4.22e58. On the 200LX's solver, there's a SIGMA function which takes arguments thus: sigma(cv,c1,c2,s,alg) where cv is the counter variable, c1, c2 and s are begin/end/step values and alg is the expression to sum. You could use this as a sort of loop. The L function allows an assignment to be made for each iteration of the loop. Try something like: sum=sigma(x,n,(n-k+1),-1,L(perm,if(x=n,n,perm*x))) Set values for n & k, solve for sum and read off the value of perm. The 42S has a handy loop construct where a register containing a number in the form bbbb.eeess (e.g. 365.34301 means begin at 365 end at 343 and step by 1 (the default)) can be incremented or decremented. The prog below took the values N=365 and K=23 and returned the same answer as the built-in perm function, only slightly more leisurely. The comments in line below are based on my dim understandings of the HP-41. Hope you can adapt these ideas to the 17BII in some way. 00 { 34-Byte Prgm} 01 LBL "PERM" 02 INPUT "N" 03 INPUT "K" 04 - 05 3 06 10^X 07 / [Divide] 08 RCL "N" 09 + 10 1 11 LBL 01 12 RCL ST Y [May be RCL Y on your calc?] 13 IP [May be INT on your calc?] 14 x 15 DSE ST Y [May be DSE Y on your calc?] 16 GTO 01 17 END ▼ Michael Burns Junior Member Posts: 24 Threads: 5 Joined: Jan 1970 04-28-2001, 06:15 PM Hi Chris Thanks! I tried your method but it didn't on my HP17BII. If you ever get a hold of a HP17BII and find a way to do it Please let me know. By the way if you have a good understanding of Probability Concepts could you please let me know if my exemples are right After each concept I maked up 2 examples. Please confirm if the two examples are correct. I want to know if my understanding of both concepts are right and if both equations are done properly. Thanks Concept #1. How many random people must be in a room to have a 50% chance of two people having the exact same birthday. I specify this before hand as being April 20th. (364/365)^253x100=49.95%-1=50.05% Therefore; the answer is 253. Example#1 You have two decks of playing cards=104. How many cards must you draw at random to have a 50% chance of getting two Ace's of Hearts. (103/104)^72x100=49.87-1=50.13% Example#2 You have one deck of cards=52 How many cards must you draw at random to have a 50% chance of getting two Ten's? First you have to know what the chances are of not getting it. As was done in the first two equations. Therefore: (49/52)^12x100=49.01%-1=50.99% Concept #2. How many random people must be in a room to have a 50% chance of any two people having an unspecified exact same birthday? (n!/[n-k]!)/(n^k) (365!/[365-23]!)/365^23=(.493-1)*100=50.73% Therefore; the answer is 23 Example#1 You have two decks of playing cards=104. How many cards must you draw at random to have a 50% chance any two unspecified cards matching exactly (104!/[104-13]!)/104^13=(.4575-1)*100=54.25% Therefore; the answer is 13. Example#2 You have one deck of cards=52 How many cards must you draw at random to have a 50% chance of any two unspecified face, number, or suit cards matching? (49/[49-7]!)/52^7=(.4211-1)*100=57.89% Therefore; the answer is 7. For a suit (40/[40-3]!)/52^3=(.4216-1)x100 =57.84% Therefore; the answer is 3. Michael Burns Junior Member Posts: 24 Threads: 5 Joined: Jan 1970 04-28-2001, 07:10 PM Hello any body out there with good understanding of Probability Theory:After each concept I maked up 2 examples. Please confirm if the two examples are correct. I want to know if my understanding of both concepts are right and if both equations are done properly. Thanks Concept #1. How many random people must be in a room to have a 50% chance of two people having the exact same birthday. I specify this before hand as being April 20th. (364/365)^253x100=49.95%-1=50.05% Therefore; the answer is 253. Example#1 You have two decks of playing cards=104. How many cards must you draw at random to have a 50% chance of getting two Ace's of Hearts. (103/104)^72x100=49.87-1=50.13% Example#2 You have one deck of cards=52 How many cards must you draw at random to have a 50% chance of getting two Ten's? First you have to know what the chances are of not getting it. As was done in the first two equations. Therefore: (49/52)^12x100=49.01%-1=50.99% Concept #2. How many random people must be in a room to have a 50% chance of any two people having an unspecified exact same birthday? (n!/[n-k]!)/(n^k) (365!/[365-23]!)/365^23=(.493-1)*100=50.73% Therefore; the answer is 23 Example#1 You have two decks of playing cards=104. How many cards must you draw at random to have a 50% chance any two unspecified cards matching exactly (104!/[104-13]!)/104^13=(.4575-1)*100=54.25% Therefore; the answer is 13. Example#2 You have one deck of cards=52 How many cards must you draw at random to have a 50% chance of any two unspecified face, number, or suit cards matching? (49/[49-7]!)/52^7=(.4211-1)*100=57.89% Therefore; the answer is 7. For a suit (40/[40-3]!)/52^3=(.4216-1)x100 =57.84% Therefore; the answer is 3. Andre' Wilhelmus Junior Member Posts: 13 Threads: 3 Joined: Jan 1970 04-29-2001, 07:18 AM To calculate P = N!/(N-K)! on a HP17BII using the Solver: P=0*L(P:1)+0*Sigma(I:N-K+1:N:1:L(P:G(P)*I))+G(P). See "HP-27S/19B Technical Applications" for an explanation of L() and G(). ▼ Michael Burns Junior Member Posts: 24 Threads: 5 Joined: Jan 1970 04-29-2001, 09:12 PM Hi Andre' I tried your equation right after the SIGMA( It flashed INVALID EQUATION something beyond SIGMA appears to be wrong. Here is exactly what I did: P=OxL(P:1)+OxSIGMA(I:N-K+1:N:1:L(P:G(P)xI))+G(P) I have tripple checked everything Please let me know what's wrong Thanks ▼ Andre' Wilhelmus Junior Member Posts: 13 Threads: 3 Joined: Jan 1970 05-01-2001, 07:14 AM You have to use the Greek capital letter for Sigma, not "SIGMA" in characters. Michael Burns Junior Member Posts: 24 Threads: 5 Joined: Jan 1970 05-01-2001, 08:16 PM Andre' Your extremely math savvy. Using the example 104!/(104-13)! = 7.62E25 Re: variables diaplayed P 0 N K What do I substitute for 0 N K the answer does not come out right Why? Thanks for Your Help Regards Michael ▼ Andre' Wilhelmus Junior Member Posts: 13 Threads: 3 Joined: Jan 1970 05-02-2001, 03:10 AM The "O"s must be "0"s (zeroes). The menu keys will be P, N and K. Type in the number for N, press menu key N, Type in the number for K, press menu key K, to get the answer P (number of Permutations or N over K), press menu key P. So to calculate 5 over 3, press 5 N 3 K P. ▼ Michael Burns Junior Member Posts: 24 Threads: 5 Joined: Jan 1970 05-02-2001, 07:41 PM Andre' You are a super terrific person. You made my day. Thank you so much. You make being on the internet a really worthwhile experience. Thanks again for sharing your excellent knowledge. Regards, Michael

 Possibly Related Threads... Thread Author Replies Views Last Post More undocumented programming limitations in the HP Prime Michael de Estrada 3 1,377 11-03-2013, 08:22 PM Last Post: Michael de Estrada [WP34s] Inverse discrete probability distributions Eduardo Duenez 11 2,541 05-17-2012, 12:31 PM Last Post: fhub 30b Probability Bug? Or Feature? Les Wright 6 1,404 11-10-2011, 12:26 PM Last Post: gene wright HP17BII+ Hardware - Atmel processor? Thomas Chrapkiewicz 4 1,259 10-16-2011, 11:32 PM Last Post: JamesT A suggestion for easy improvement of the HP17bII+ Jose Gonzalez Divasson 1 704 07-10-2011, 10:38 AM Last Post: Tim Wessman black HP17bII Jose Gonzalez Divasson 5 1,453 06-17-2011, 05:20 PM Last Post: Don Shepherd HP17bii+ solver vs. HP17bii/HP19bii/HP27S M. Joury 5 1,426 05-20-2011, 05:50 AM Last Post: Don Shepherd Replacing dead screen on my HP17BII with one from HP27S? John Hinz 10 2,117 07-10-2010, 03:56 PM Last Post: Csaba Tizedes (Hungary) >-->-->-->--> HP17BII+ disassembled and...surprise ( at least for me ) NACHO 3 985 10-26-2009, 12:55 AM Last Post: DavidShenk HP17bII+ Solver - Payback Period formula RMIER 6 1,476 08-02-2009, 05:36 PM Last Post: Peter A. Gebhardt

Forum Jump: 