Author Topic: Statistics Question  (Read 7261 times)

Offline shvarz

  • Bot God
  • *****
  • Posts: 1341
    • View Profile
Statistics Question
« Reply #15 on: May 26, 2005, 01:53:59 AM »
Hmm, I feel dumb, but I don't get it.  I don't see why you have to do this.  But even if you must, I am not sure you should.

If you do it my way, it is very easy to understand and saves on processing cycles.  I think right now the mutation routine scans through every line of DNA code and decides whether it wants to mutate that.  This requires all those random numbers to be generated and some calculations.  But if you do it my way, then the routine would do a quick single check on how many mutations should offspring get - and you can get that from the "1 in 36" frequency using Poisson distribution.  If the number is 0, then the whole DNA is copied in one step, no need to run the mutation routine at all.  If the answer is 1, then it checks which mutation this will be and applies it to the DNA.  If it is two, then it runs the routine twice.  At any realistic mutation frequncy the probability of getting three mutations in the same offspring should be so low, that it can be ignored completely.
"Never underestimate the power of stupid things in big numbers" - Serious Sam

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Statistics Question
« Reply #16 on: May 26, 2005, 02:01:04 AM »
We could do it that way, but in the end it's just a matter of how the program runs itself, not a User Interface Problem.

That is, you may still want to do minor adjustments in specific mutation areas.

The way it works right now I just do multiply by 1.1 until the chance per offspring reaches a certain value.  So as it stands it's not a huge hurdle.

Offline AZPaul

  • Bot Builder
  • **
  • Posts: 76
    • View Profile
Statistics Question
« Reply #17 on: May 28, 2005, 01:47:50 PM »
Quote
A
= B or C or D or E
= (B or C) or (D or E)
= (B + C - B*C) or (D + E - D * E)
= (B + C -B*C) + (D + E - D*E) - (D + E - D*E)*(B + C -B*C)
= B + C -B*C + D + E - D*E -DB -DC -DBC - EB -EC- EBC +DEB +DEC -DEBC
= B + C + D + E - BC - DE -BD -CD -BCD - BE - CE - BCE + BDE + CDE - BCDE
= B + C + D + E - BC - BD - BE - CD - CE - DE - BCD - BCE + BDE + CDE - BCDE
(check over my math)

ick.  You're right. The baby's ugly.

I see where you're trying to go.  Unfortunately, if I am reading this right, in a general case of n variables composing 'A' there will be n^2 solutions. The scaling requirement may be the key. That puts a bound on the number of solutions.  I haven't cracked a matrix mechanics book in decades. I suppose now would be a good time to see if I can even find the &%#@ thing.

I'll try to hunt it down today, but, don't wait up for me.

Good God, the things you get into when you're having fun!

-P

Offline Sprotiel

  • Bot Destroyer
  • ***
  • Posts: 135
    • View Profile
Statistics Question
« Reply #18 on: May 28, 2005, 03:00:17 PM »
Here's my try on the problem.

If B, C, D, E are independent and A=(B||C||D||E), then ~A=~B&~C&~D&~E (note: '~A' means 'not A') and P(A)=1-(1-P(B))(1-P( C))(1-P(D))(1-P(E)). To change P(A) and conserve the relative probabilities of B, C, D, E, you need to solve a quartic equation.

But I think it would be simpler to define a as the expectation value of the number of events. In that case a = P(B)+P( C)+P(D)+P(E) and it's straightforward to rescale the probabilities.