[ 3 / biz / cgl / ck / diy / fa / ic / jp / lit / sci / vr / vt ] [ index / top / reports ] [ become a patron ] [ status ]
2023-11: Warosu is now out of extended maintenance.

/sci/ - Science & Math


View post   

File: 1 KB, 224x221, sampling_dist3.gif [View same] [iqdb] [saucenao] [google]
6729517 No.6729517[DELETED]  [Reply] [Original]

Hey /sci/ help a mathgeek out

So I've got some iids of natural numbers, I'm going to call them <span class="math">X_i[/spoiler] for i=1,...,n.

If I define <span class="math">X = \sum_i X_i[/spoiler], is there an easy way to compute <span class="math">P(X=m)[/spoiler]?

The naive way I'm doing it at the moment requires me to manually count the partitions; for example, if n=4 and m=3 then the sum works out as

<span class="math">P(X=3) = {}^4C_1 P(X_i=3) P(X_i=0)^3
+ {}^4C_2{}^2C_1 P(X_i=2) P(X_i=1) P(X_i=0)^2
+ {}^4C_3 P(X_i=1)^3 P(X_i=0)[/spoiler]

As I'm counting over the different partitions of m, it's very hard to generalize. I want to be able to have m and n go up to about 50.

More context in comments.

>> No.6729521

>>6729517

In the case I'm interested in, <span class="math">P(X_i=n)=\frac1{6^\floor{\frac n2}}\times \delta^{-1}[/spoiler], where <span class="math">\delta=2[/spoiler] when <span class="math">n[/spoiler] is even and math]\delta=3 when <span class="math">n[/spoiler] is odd.

It's from a wargame (dystopian wars), where you roll d6's.
1-3 is a miss
4-5 is a hit
6 is TWO hits AND a reroll

You can find the expected value of a single dice from the above, and it's exactly 0.8.
What bothers me is that this is the same average as hitting on 2+ on a five-sided dice, but the results are wildly different. As we all know, the average is a very poor measure at times.

I want to get a look at the distribution, so I can figure out some better odds. Combinatorics is not my field, and I know you have sneaky partition tricks hiding up your sleeves - something something littlewood richardson iirc?

Anyway thanks

>> No.6729524

>>6729521
>In the case I'm interested in, Unknown control sequence '\floor', where =2 when n is even and math]\delta=3 when n is odd.

Try again!

In the case I'm interested in, <span class="math">P(X_i=n)=\frac1{6^{\left\lfloor{\frac n2}\right\rfloor}}\times \delta^{-1}, where <span class="math">\delta=2[/spoiler] when <span class="math">n[/spoiler] is even and <span class="math">\delta=3[/spoiler] when <span class="math">n[/spoiler] is odd.[/spoiler]

>> No.6729528

>>6729524
HNNNNNNNG made me open my tex editor goddamn

<span class="math">P(X_i=n)=\frac1{6^{\left\lfloor{\frac n2}\right\rfloor}}\times \delta^{-1}[/spoiler],
where <span class="math">\delta=2[/spoiler] when n is even and <span class="math">\delta=3[/spoiler] when n is odd.

>> No.6729533

>>6729528
If it makes you feel better I'm also horrible with /sci/ latex.

>> No.6729534

>>6729528
I DELETED THAT SPACE FFFFF
<span class="math">P(X_i=n)=\frac1{6^{\left\lfloor{\frac n2}\right\rfloor}}\times \delta^{-1}[/spoiler]

>> No.6729537
File: 77 KB, 500x500, 1406741465591.png [View same] [iqdb] [saucenao] [google]
6729537

>>6729534

>> No.6729539

>>6729534
Well something is going wrong. That's what I get for trying to do a floor function on /sci/
>>6729533
It does, thanks anon. So many "research" hours spent on debugging fucking LaTeX.

>> No.6729540

>>6729539
Bitch you can't floor functions on /sci/.

The latex on /sci/ is only for displaying shit.

>> No.6729541

>>6729517
I don't know a whole lot of probability but why is there a 4 before the C:s and why are there even C:s to begin with?

>> No.6729544
File: 658 KB, 759x1500, evil-clippy.png [View same] [iqdb] [saucenao] [google]
6729544

>>6729537
Thanks dude!
Do you know why a space is being inserted into my code? Or, even better, thoughts on my math problem?

>> No.6729546
File: 62 KB, 184x184, 1406730410042.png [View same] [iqdb] [saucenao] [google]
6729546

>>6729544
Well Mr. Angry Clippy, I think you might be trying to do functions with latex, such as floor, ceiling, etc. On /sci/ you can't do that, it's all just code to display formulas.

I'll try to help with the math problem if you write it out properly, i.e:
>>6729541

>> No.6729548

>>6729540
Oh, right, thanks!
<span class="math">\left\lfloor x \right]rfloor[/spoiler]

>>6729541
It's the combinatorial coefficient, sorry, maybe my notation is unfamiliar?
<span class="math">{}^nC_r=\frac{r!}{n!(n-r}!}[/spoiler]
They're there because I am counting together the results across different dice. The middle term, frex, counts the results
2,1,0,0
2,0,1,0
2,0,0,1
1,2,0,0
0,2,1,0
0,2,0,1
1,0,2,0
0,1,2,0
0,0,2,1
1,0,0,2
0,1,0,2
0,0,1,2
The idea is "Choose four from two to be nonzero, then assign one from the chosen two to be the 2"

>> No.6729549

>>6729528
>>6729534
If you don't put spaces in your code then 4chan will force them in where you won't want them

I don't think floor is a thing anyway
<div class="math"> P(X_i=n) = \frac 1{6^{ \left \lfloor{ \frac n2} \right \rfloor}} \times \delta^{-1}
</div>

>> No.6729550

>>6729548
<span class="math">\left\lfloor x \right\rfloor[/spoiler]
LOOK I DID IT XD
And iirc you need to set things to displaystyle, eg
<span class="math">\sum_i[/spoiler]
vs
<span class="math">\displaystyle\sum_i[/spoiler]

>> No.6729552

>>6729549
Thank you, this is what I wanted to know. Good to know I'm not going crazy.

>> No.6729553

>>6729549
welp I was wrong.
Still unreadable. I blame your shit fraction commands

<div class="math"> P(X_i=n) = \frac 1{6^{ \left \lfloor{\displaystyle \frac n2} \right \rfloor}} \times \delta^{-1} </div>

>> No.6729561

>>6729553
Your judgement upon my fraction commands is warranted and accepted.

>> No.6729563

>>6729541
http://en.wikipedia.org/wiki/Binomial_coefficient