posted
I know I haven't posted in a while, but I'm hoping there are still some math dorks out there who can help me I'm taking a physics class where I don't really understand the math, so this thread may get bumped up every few days. For the moment, I'm working with the binomial distribution, and I'm being asked to calculate the average value of X^2 where x=n1-n2.
Or, basically, <x^2>=? Now, I'm pretty sure the next step here is < x^2 >=< {n1-n2}^2 >
I'm not making any mathematical mistakes in that step am I?
Assuming thats correct, where do I go from there?
If this were a first order calculation, I'd simply say that < x >=< n1-n2 >=Np-Nq (N the total number of trials, p and q the probability of each outcome). Can I stick that inside the brackets for the second order, and say < x^2 >=< {Np-Nq}^2 >? If not, can you explain why? And if so, what do I do from there? At that point, I don't even have a clue, really.
Posts: 4112 | Registered: May 2001
| IP: Logged |
posted
you've got to do the binomial expansion (or good old FOIL) so {n1^2 +2*n1*(-n2)+(-n2)^2} is I think your next step... not sure where to go after that though though simplified:
posted
Rico, it is unlikely n1 and n2 have been assigned numerical values. But Paul may have been given a range.
Were you, Paul? Good to see you back here, BTW.
Meanwhile, this looked like it might be useful. If you have questions that are more physics-specific, I'm more likely to be helpful. Abstract calculus is not something I am overly fond of.
Posts: 32919 | Registered: Mar 2003
| IP: Logged |
posted
Well usually in physics you're given some basic values in your typical word problem. I figured n1 stood for one number in the formula, and n2 stood for another.
Perhaps it might help more if Paul gave us an example problem in which this formula is used
Posts: 459 | Registered: Mar 2005
| IP: Logged |
I'm guessing I don't understand what the question is though, since it has nothing to do with a number of trials. Could you explain it more?
Posts: 148 | Registered: Feb 2000
| IP: Logged |
N is number of trials. q is probability of result 2 happening. p is probability of result 1 happening. n1 is number of events of result 1, n2 is number of events of result 2. They are uncorrelated events.
Posts: 4112 | Registered: May 2001
| IP: Logged |
posted
What I meant was is N = n1+n2 (i.e. only two events. That's usually assumed in binomial, but sometimes people say binomial and mean multi-nomial).
If so then q = 1-p, and I would solve the problem: <x^2> = <[n1-n2]^2> = <n1^2> -2<n1><n2> + <n2^2> = Npq+(Np)^2 - 2(Np)(Nq) + Npq+(Nq)^2
where I used the fact that <x^2> = Var(x)+<x>^2 and Var(n1) = Var(n2) = Npq and <n1> = Np and <n2> = Nq. If there are multiple possible events then the Var(n1) and Var(n2) are different.
Then, substituting in q = 1-p you may be able to simplify further. Of course there's no guarantee I did any of it right. I use stats a lot, but abuse it almost as much.
Posts: 2926 | Registered: Sep 2005
| IP: Logged |
posted
<edit> This isn't right. I think I see why. Are n1 and n2 two separate random variables, each with N trials? If so the correct final line should be: = Np(1-p)+(Np)^2 - 2(Np)(Nq) + Nq(1-q)+(Nq)^2
since then Var(n1) = Np(1-p) and Var(n2) = Nq(1-q)
If n1 and n2 have a different number of trials, say N_1 and N_2, then the final line should be: = N_1p(1-p)+(N_1p)^2 - 2(N_1p)(N_2q) + N_2q(1-q) + (N_2q)^2