Tilted Forum Project Discussion Community  

Go Back   Tilted Forum Project Discussion Community > The Academy > Tilted Knowledge and How-To


 
 
LinkBack Thread Tools
Old 04-16-2006, 10:02 PM   #1 (permalink)
Free Mars!
 
feelgood's Avatar
 
Location: I dunno, there's white people around me saying "eh" all the time
[Math/Stats]Setting and adjusting probability

Ok, lets say I have a set of number and each one starts out as equal probabilty of appearing (20%).
{0, 1, 2, 3, 4}
{.2, .2, .2, .2, .2}

Let's say that I want to change the probability of #2 appearing to 50%. That would mean that the probability of other 4 numbers {0, 1, 3, 4} will adjust accordingly to appear 12.5% of the times.
{0, 1, 2, 3, 4}
{.125, .125, .5, .125, .125}

It's easy to figure out how to adjust the probability automatically for other number when you're setting the frequency of one particular number for the first time.

Here's the head scratcher for me, once I change the probabilty of one particular number and then change the probabilty of a second number. For example, I want to set the probability of 0 appearing 30% of the time and at the same time, automatically adjust other frequencies accordingly as long the sum is equal to 1.

How would I adjust other number automatically? Is there a formula?
__________________
Looking out the window, that's an act of war. Staring at my shoes, that's an act of war. Committing an act of war? Oh you better believe that's an act of war
feelgood is offline  
Old 04-17-2006, 12:30 AM   #2 (permalink)
Psycho
 
aKula's Avatar
 
Well the way I'd do it is like this:
(number of times same unknown probability appears) x p + Sum(known probabilities) = 1
where p is the probability you want for the rest of your numbers.
then solve for p.
p = (1 - Sum(known probabilities))/((number of times same unknown probability appears)

Maybe I made an obvious mistake or misunderstood the question.
__________________
"I am the wrath of God. The earth I pass will see me and tremble." -Klaus Kinski as Don Lope de Aguirre
aKula is offline  
Old 04-17-2006, 10:05 AM   #3 (permalink)
Free Mars!
 
feelgood's Avatar
 
Location: I dunno, there's white people around me saying "eh" all the time
Not quite what I want, what you're aiming to do is setting the same probabily for every number regardless of previous change.

If I have a set of probabily like this:

{20%, 20%, 20%, 20%, 20%}

And then it changes to this:

{12.5%, 12.5%, 50%, 12.5%, 12.5%}

And it changes again to this:

{50%, 3.125%, 40.625%, 3.125%, 3.125%}

Notice how I perserved the previous change by automatically adjusting the change?
__________________
Looking out the window, that's an act of war. Staring at my shoes, that's an act of war. Committing an act of war? Oh you better believe that's an act of war
feelgood is offline  
Old 04-17-2006, 11:53 PM   #4 (permalink)
Psycho
 
aKula's Avatar
 
Notice how the each of the other probabilities have decreased by the same amount (9.375)? Now this is the case whenever you did such a step (all the other probabilities decrease by the same amount) you could use that to make an easy way of calculating it.

So just find by how much the one probability has increased:
50-12.5 = 37.5. Now divide this by 4 to get 9.375 and subtract this from each of the probabilities.
Let P be the probability you set, Po be the value this probability was beforehand.
Q is any of your new probabilities that are changed due to the change in Po. Qo is what Q was originally.
Q = Qo - (P - Po)/(n-1)

I guess you could use a similar method if you wanted each of your probabilities to decrease by the same percentage of their original value.

Edit: Of course this may be exactly what you were doing and were just after a faster method, if so ignore the above post
__________________
"I am the wrath of God. The earth I pass will see me and tremble." -Klaus Kinski as Don Lope de Aguirre

Last edited by aKula; 04-17-2006 at 11:55 PM..
aKula is offline  
Old 04-18-2006, 12:27 AM   #5 (permalink)
Free Mars!
 
feelgood's Avatar
 
Location: I dunno, there's white people around me saying "eh" all the time
Actually the way I came up with the above number was from adjusting the numbers manually

I am kind of worried about one thing when it comes to using your formula, what happens if you keep applying that formula to a number, like say change the frequency of 2 to 50%, then 70%, then 80%. All the changes to others will eventually result in a negative number.

Maybe that's the right way to go, just ignore those that are 0% or less since it all adds up to 100% right?
__________________
Looking out the window, that's an act of war. Staring at my shoes, that's an act of war. Committing an act of war? Oh you better believe that's an act of war
feelgood is offline  
Old 04-18-2006, 01:18 AM   #6 (permalink)
Psycho
 
aKula's Avatar
 
Yeah you'll eventually get into a negative number because you have the other one that started on 50 as well. And you can't ignore the ones that are less than zero as the formula relies on subtracting the amount you added so the sum of all is 100. To get around this you need to make it so that the numbers are decreased by the same percent, ie when you increase one, the rest all decrease by a fixed percentage.

I'll try to work out how to do this and get back to you soon.
__________________
"I am the wrath of God. The earth I pass will see me and tremble." -Klaus Kinski as Don Lope de Aguirre
aKula is offline  
Old 04-18-2006, 02:53 AM   #7 (permalink)
Psycho
 
aKula's Avatar
 
Ok it's pretty simple:
For the case above you want the percentages to make 100 so:
87.5*X + 50 = 100
So X is (100-50)/87.5 = 0.5714
Then you use this X and multiply the rest of your probabilities and you'll get 100 as the sum of the probabilities, which is what you're looking for. (Alternativley you can express the probabilities in their "correct" form ie. X = (1-P)/Sum(Q) where P is the probability you set and Q is the sum of the other probabilities in your original set).
__________________
"I am the wrath of God. The earth I pass will see me and tremble." -Klaus Kinski as Don Lope de Aguirre

Last edited by aKula; 04-18-2006 at 04:01 AM..
aKula is offline  
 

Tags
adjusting, math or statssetting, probability


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -8. The time now is 12:32 PM.

Tilted Forum Project

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Search Engine Optimization by vBSEO 3.6.0 PL2
© 2002-2012 Tilted Forum Project

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54