Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation

Re: Is this really random?

by aitap (Deacon)
on Nov 22, 2012 at 17:47 UTC ( #1005162=note: print w/replies, xml ) Need Help??

in reply to Is this really random?

Well, actual probability of getting 5 heads and 5 tails is C(10,5)*p(head)^5*p(tail)^5 = (10!)/(5!*5!)*(0.5^5)*(0.5^5) = 0.24609375, so you probably won't always get this result.
(See Bernoulli trial for more information)
Sorry if my advice was wrong.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1005162]
[PriNet]: i think i found the problem, the "source" array that sets the individual key values isn't being cleared, it's keeping the previous values...
[atcroft]: PriNet: You might consider posting a small, self-contained snippet of that segment of your code, and see if someone else has a better idea.....
[atcroft]: PriNet: Ahhh... interesting.
[PriNet]: small would be a problem *heh*... the program reads all the lines from a pdf and converts the individual colum data to a seperate key/value pair... that's where the "previous" array from the pdf is not being cleared properly before reading the next pdf
[atcroft]: PriNet: It was a thought....
[PriNet]: thanx... actually just having someone to talk to was making me think... *heh*

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (3)
As of 2017-06-28 03:18 GMT
Find Nodes?
    Voting Booth?
    How many monitors do you use while coding?

    Results (620 votes). Check out past polls.