Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Ruby
[QUIZ] Banned Words (#9)
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Florian G. Pflug, post: 4451092"] I believe that you oversimplified the problem, and therefore your math is wrong (or, rather, a too coarse approximation, as your results prove). From your paper: N... Number of Words. n... Number of banned words. r:=P[word w is banned]=n/N p:=P[slice of size x passes] = (1-r)^x. Your formula for p ((1-r)^x) assumes that the probability r is constant, while in reality it changes with every word you put into your slice. The probability of a slice of size x passing is the same as the probability that none of 100 words you randomly pick is banned. Now, while you pick (you pick only non-banned words, because you immediatly stop if you get a banned one), the ration banned/total for the _remaining_ set constantly changes. You can instantly see that your formula cannot be exact if you try to calculate the probability of a slice of size N passing. Your formulat gives (1-n/N)^N, which is probably quite small, but still greater than zero. The exact probability is obviosly zero (assuming n > 0) Additionally, the probability r changes everytime you find a non-banned slice. If, for example, you test 500 out of 100 words, and the slice passes, the being-banned probability of the rest of the words doubles. greetings, Florian Pflug [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Ruby
[QUIZ] Banned Words (#9)
Top