seyiroju
(Seyi Olorire)
April 7, 2017, 9:30am
1
I am trying to obtain the moments of this function via Probability Generating Function (PGF) or Moment Generating Function (MGF) but having problem with it.
The pdf is
((Binomial[n, x])^v*\[Theta]^x*(1 - \[Theta])^(n - x))/\!\(\*UnderoverscriptBox[\(\[Sum]\), \(i = 1\), \(n\)]\(\*SuperscriptBox[\((Binomial[n, i])\), \(v\)]*
\*SuperscriptBox[\(\[Theta]\), \(i\)]*\*SuperscriptBox[\((1 - \[Theta])\), \(n - i\)]\)\)
I want to find the derivative of the PGF, with respect to t as expressed below and set t=1: that will give first moment. differentiating the second time and set t=1 gives second moment …
D[\!\(\*UnderoverscriptBox[\(\[Sum]\), \(x = 1\), \(n\)]\*FractionBox[\(\*SuperscriptBox[\(t\), \(x\)]\ \*SuperscriptBox[\((1 - \[Theta])\), \(n - x\)]\ \*SuperscriptBox[\(\[Theta]\), \(x\)]\ \*SuperscriptBox[\(Binomial[n, x]\), \(v\)]\), \(\*UnderoverscriptBox[\(\[Sum]\), \(i = 1\), \(n\)]\*SuperscriptBox[\((1 - \[Theta])\), \(\(-i\) + n\)]\ \*SuperscriptBox[\(\[Theta]\), \(i\)]\ \*SuperscriptBox[\(Binomial[n, i]\), \(v\)]\)]\), t]
I document is attached for details if this code is not clear enough. Thanks for your kindness.
Olorire
jbaldwin
(Jim Baldwin)
April 7, 2017, 6:08pm
2
If you set specific integer values for v, you’ll get results and be able to see the pattern.
jbaldwin
(Jim Baldwin)
April 8, 2017, 6:47am
3
Playing around with this a bit and trying different values of k suggests that the general formula for the i-th moment is given by
m[i_, n_, k_, \[Theta]_] := - FactorialPower[n, i]^k \[Theta]^i HypergeometricPFQ[ConstantArray[i - n, k],
ConstantArray[i + 1, k - 1], (-1)^(k - 1) \[Theta]/(-1 + \[Theta])]/
((i!)^(k - 1) (-1 + \[Theta])^i (-1 + HypergeometricPFQ[ConstantArray[-n, k], ConstantArray[1, k - 1],
(-1)^(k - 1) \[Theta]/(-1 + \[Theta])]))
seyiroju
(Seyi Olorire)
April 8, 2017, 6:54pm
4
Alright, we can choose specific values for v, like -10, -5, 1, 5, 10 and see the pattern. I will also try it here.
Thanks for your ideal.
seyiroju
(Seyi Olorire)
April 8, 2017, 7:00pm
5
Brilliant idea but complicated somehow.
Thanks for your effort.
jbaldwin
(Jim Baldwin)
April 8, 2017, 7:37pm
6
The brute force method is just to write a single function covering all moments. For the k-th momement one could use
moment[k_, n_, v_, \[Theta]_] := (D[\!\(
\*UnderoverscriptBox[\(\[Sum]\), \(x = 1\), \(n\)]
\*FractionBox[\(
\*SuperscriptBox[\(t\), \(x\)]\
\*SuperscriptBox[\((1 - \[Theta])\), \(n - x\)]\
\*SuperscriptBox[\(\[Theta]\), \(x\)]\
\*SuperscriptBox[\(Binomial[n, x]\), \(v\)]\), \(
\*UnderoverscriptBox[\(\[Sum]\), \(i = 1\), \(n\)]
\*SuperscriptBox[\((1 - \[Theta])\), \(\(-i\) + n\)]\
\*SuperscriptBox[\(\[Theta]\), \(i\)]\
\*SuperscriptBox[\(Binomial[n, i]\), \(v\)]\)]\), {t, k}]) /. t -> 1
which in Mathematica looks like
That can be used to check the function I defined previously.