▼
Posts: 24
Threads: 5
Joined: Jan 1970
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
▼
Posts: 7
Threads: 2
Joined: Jan 1970
▼
Posts: 24
Threads: 5
Joined: Jan 1970
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
▼
Posts: 7
Threads: 2
Joined: Jan 1970
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!
▼
Posts: 24
Threads: 5
Joined: Jan 1970
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
Posts: 195
Threads: 25
Joined: Jul 2005
What about Stirling's approximation? For large numbers the error is about 10%.
▼
Posts: 24
Threads: 5
Joined: Jan 1970
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
▼
Posts: 195
Threads: 25
Joined: Jul 2005
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,
▼
Posts: 24
Threads: 5
Joined: Jan 1970
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
▼
Posts: 195
Threads: 25
Joined: Jul 2005
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
▼
Posts: 24
Threads: 5
Joined: Jan 1970
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
▼
Posts: 195
Threads: 25
Joined: Jul 2005
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
▼
Posts: 24
Threads: 5
Joined: Jan 1970
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
▼
Posts: 195
Threads: 25
Joined: Jul 2005
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
▼
Posts: 24
Threads: 5
Joined: Jan 1970
Juan check your email. Please. If you want to respond on this web site instead that's OK I like comming Here
Posts: 136
Threads: 22
Joined: Aug 2010
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
▼
Posts: 12
Threads: 4
Joined: Jan 1970
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.
▼
Posts: 136
Threads: 22
Joined: Aug 2010
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.
▼
Posts: 24
Threads: 5
Joined: Jan 1970
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
Posts: 24
Threads: 5
Joined: Jan 1970
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.
▼
Posts: 136
Threads: 22
Joined: Aug 2010
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.
▼
Posts: 673
Threads: 20
Joined: Oct 2008
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).
Posts: 136
Threads: 22
Joined: Aug 2010
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
▼
Posts: 24
Threads: 5
Joined: Jan 1970
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.
Posts: 24
Threads: 5
Joined: Jan 1970
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.
Posts: 13
Threads: 3
Joined: Jan 1970
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().
▼
Posts: 24
Threads: 5
Joined: Jan 1970
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
▼
Posts: 13
Threads: 3
Joined: Jan 1970
You have to use the Greek capital letter for Sigma, not "SIGMA" in characters.
Posts: 24
Threads: 5
Joined: Jan 1970
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
▼
Posts: 13
Threads: 3
Joined: Jan 1970
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.
▼
Posts: 24
Threads: 5
Joined: Jan 1970
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
|