in reply to Re^8: Array problem
in thread Array problem

Well, if my algorithm has a bias, it should be the same values that are picked more or less often than expected, each time you run the algorithm.

Furthermore, I don't think abs($stats{$_} - 3 * $n) is what needs to converge towards zero; abs($stats{$_} - 3 * $n)/$n ought to converge towards zero. And that does.

Replies are listed 'Best First'.
Re^10: Array problem
by BrowserUk (Patriarch) on Sep 29, 2008 at 15:22 UTC
    it should be the same values that are picked more or less often than expected

    Agreed.

    abs($stats{$_} - 3 * $n)/$n ought to converge towards zero. And that does.

    Agreed. My test is broken. Using absolute variances instead of a percentages, hides that they actually do converge.


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.