.com.unity Forums

.com.unity Forums (http://forum.shrapnelgames.com/index.php)
-   Dominions 3: The Awakening (http://forum.shrapnelgames.com/forumdisplay.php?f=138)
-   -   Site Searching Statistics Questions (http://forum.shrapnelgames.com/showthread.php?t=36838)

VedalkenBear November 15th, 2007 03:18 PM

Re: Site Searching Statistics Questions
 
Thejeff: Sorry, the 1-(P of not Earth) was supposed to be not Astral.

The 'if not searched' value included the probability in the Astral analysis that an Earth site could be any one of the remaining sites (that is, the probability of the site NOT being Astral was 8/9). If Earth was searched (at level 4 or 9), then the probability that the sites could be Astral would be 1/8, not 1/9. The slightly higher value takes this into account. (I had this value at hand because I initially forgot Holy sites, and therefore had done all the calculations for 1/8 instead of 1/9.)

Edi November 15th, 2007 03:19 PM

Re: Site Searching Statistics Questions
 
Probability mathematics make my head hurt. That is all.

VedalkenBear November 15th, 2007 03:25 PM

Re: Site Searching Statistics Questions
 
Oh, I'm using the binomial not the hypergeometric. The binomial probabilities are simply the probabilities of a given number of sites in a province. These states are not dependent on one another. If the site placement algorithm checked for a first site, found none, and _did not check anymore_, that would be conditional probability.

Basically, for the second calculation you have:

0 sites in province (trivial case): 0
1 site in province (also trivial): 0
2 sites in province, 1 is earth, chance that the second is earth: Probability that there are two sites in province * 1-(Probability that the first is not Astral(1)*Probability that the second is not Astral(0.875) = 0.3456*(1-(1*0.875)

And so on. If the probabilities change given one state, that means the probabilities are conditional. The only way for that to happen in this case would be if the site search algorithm were to stop checking for sites if any check failed. That AFAIK does not happen.

lch November 15th, 2007 03:28 PM

Re: Site Searching Statistics Questions
 
Quote:

VedalkenBear said:
Or an 7.83% chance of finding an Astral site in a province that already has another Earth site, _provided you did not search for the Earth site_. If you did, then it is 0.0876, or an 8.76% chance.

Okay, this does sound wrong. http://forum.shrapnelgames.com/images/smilies/happy.gif As said before, the sites that are in a province are determined when the game starts, not when a site search is being made. Either there is a specific site in a province or there isn't. What you're dealing with regarding to statistics is in which of the five possible scenarios zero/one/two/three/four sites in the province you are and then if you picked the right path which covers one of these sites. Unless you found any sites, all these five scenarios go into your equation to find a site or not. So there's a 20% chance for that specific scenario and then tied to that a xx% chance to find a new site. These xx% chances from the different scenarios add up. Once you found some sites, you cancel out those chances from the scenarios that are no longer possible, so the overall probability to find a new site goes down. I hope that this makes any sense.

VedalkenBear November 15th, 2007 03:39 PM

Re: Site Searching Statistics Questions
 
Ich: Actually, there isn't a 20% chance for each scenario. There is a 0.4 probability of a site being placed, with a maximum of 4 sites being able to be placed. This is a pure binomial distribution. Even in the case of 0.5 probability, there isn't a flat chance.

I agree that they are determined when the game starts. However, we cannot look at a province and tell how many sites are in it. Therefore, we must take into account the various probabilities regarding the number of sites.

Once that is done, you have the scenario I described in my initial post. To go over it again:

If there are 0 sites in a province, and you search for an Earth site, the probability that you will find an Earth site is 0.

If there is 1 site in a province, and you search for an Earth site, the probability that you will find an Earth site is 1/9. (Assuming equal probabilities)

If there are 2 sites in a province, and you search for an Earth site, the probability that you will find at least one Earth site is the probability that both sites are not Earth sites, subtracted from 1.

etc.

Now, those are all _conditional_ probabilities. Since the events are independent (the number of sites does not affect the types of sites), the total probability is the product of the two. Therefore, the probability of one site (0.1296) multiplied by the probability that the site is an Earth site (0.1111) will be the probability of their being one site in the province AND that site being Earth.

Since we do not know the number of sites in the province, we must find the probabilities of each case, and then sum them to find the overall probability of finding at least one Earth site in a province when we search it. That is the probability I gave you.

Evilhomer November 15th, 2007 03:57 PM

Re: Site Searching Statistics Questions
 
I finally decided to be math geeky, so here goes:

Binomical distribution GIVEN 1 site is earth (when we entered province // no searches done).

sites - probability
0 - 0.000
1 - 0.216
2 - 0.432
3 - 0.288
4 - 0.064

Chance of finding one or more astral sites using a level 9 search spell (assuming all types of sites have the same probability, not true but whatever...)

P(2)*(chance of 1+ astral site=1/8)+P(3)*(chance of 1+ astral site=15/64)+P(4)*(chance of 1+ astral site=169/512)

=

0.143 (or 14% if you wish)

So the chance decreases, but not by as much as reported by valkenbear. Same calculation provided that we have searched using gnome lore (and found 1 site) will follow..

*Note the "chance of 1+ astral site" changes, being 1/8 in the first bracket and (1/8*7/8)+(7/8*1/8)+(1/8*1/8)=15/64 in the second bracket, and so forth

lch November 15th, 2007 04:00 PM

Re: Site Searching Statistics Questions
 
Yeah, my bad about the zero/one/two/three/four being equally possible. That was simplifying it too much, although I wouldn't want to do this in a full detail analysis which would include at which level you searched for the sites already, what terrain we have, etc. - this can get overly complicated.

What's only important: How many sites there are (a random variable), how many sites we found already and how much we searched already / how many search possibilities are left.

VedalkenBear November 15th, 2007 04:08 PM

Re: Site Searching Statistics Questions
 
May I ask how you found that new distribution, Evilhomer? I think I see where you're going, but I'm missing that part. (And I am mildly affronted at the fact that you call this 'math geeky'. This is what I'll be doing for a living soon.)

Lazy_Perfectionist November 15th, 2007 04:14 PM

Re: Site Searching Statistics Questions
 
I beat a hasty retreat before the math. I yield the field rather than suffer an ignominious defeat. I'll be watching from the sidelines, though.

VedalkenBear November 15th, 2007 04:21 PM

Re: Site Searching Statistics Questions
 
LP: Aw, that doesn't help. I need people to catch me on stuff. :p


All times are GMT -4. The time now is 09:14 PM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2024, Shrapnel Games, Inc. - All Rights Reserved.