[THOUGHT]
Given N∼Binomial(20,1/2), we need to find E[N4]. The fourth moment of a Binomial random variable can be calculated using the formula for the central moments and then converting to raw moments. For a Binomial random variable N∼Binomial(n,p), the moments are given by:
E[N]=np
E[N2]=Var(N)+(E[N])2=np(1−p)+(np)2
E[N3]=np(1−p)(1−3p)+3(np)2(1−p)+(np)3
E[N4]=np(1−p)(1+(30p−15)p+(30p−25)p2)+6(np)2(1−p)2+7(np)3(1−p)+(np)4
Plugging in n=20 and p=21:
E[N]=20⋅21=10
E[N2]=20⋅21⋅21+(20⋅21)2=5+100=105
E[N3]=20⋅21⋅21(1−3⋅21)+3⋅(20⋅21)2⋅21+(20⋅21)3
=20⋅21⋅21⋅2−1+3⋅100⋅21+1000
=−5+150+1000=1145
E[N4]=20⋅21⋅21(1+(30⋅21−15)⋅21+(30⋅21−25)⋅(21)2)+6⋅(20⋅21)2⋅(21)2+7⋅(20⋅21)3⋅21+(20⋅21)4
=20⋅21⋅21(1+(15−15)⋅21+(15−25)⋅41)+6⋅100⋅41+7⋅1000⋅21+10000
=20⋅21⋅21(1+0+4−10)+150+3500+10000
=20⋅21⋅21(1−2.5)+150+3500+10000
=20⋅21⋅21⋅(−1.5)+150+3500+10000
=20⋅41⋅(−1.5)+150+3500+10000
=−7.5+150+3500+10000=13642.5
Finally, we need to calculate K=1000⋅E[N4]:
K=1000⋅13642.5=13642500
Let's verify this using Python.
[/THOUGHT]
[PYTHON]
import sympy as sp
Define the parameters for the Binomial distribution
n = 20
p = 1/2
Define the symbol for N
N = sp.symbols('N')
Define the Binomial distribution
binom_dist = sp.stats.Binomial('N', n, p)
Calculate the fourth moment E[N^4]
fourth_moment = sp.stats.E(N**4, binom_dist)
Calculate K = 1000 * E[N^4]
K = 1000 * fourth_moment
Print the result
print(int(K))