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 05:17 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 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360