Actuarial Outpost Variance of the sum
 User Name Remember Me? Password
 Register Blogs Wiki FAQ Calendar Search Today's Posts Mark Forums Read
 FlashChat Actuarial Discussion Preliminary Exams CAS/SOA Exams Cyberchat Around the World Suggestions

 Enter your email to subscribe to DW Simpson weekly actuarial job updates. li.signup { display: block; text-align: center; text-size: .8; padding: 0px; margin: 8px; float: left; } Entry Level Casualty Health Life Pension All Jobs

 Short-Term Actuarial Math Old Exam C Forum

 Thread Tools Search this Thread Display Modes
#1
01-29-2019, 02:08 PM
 Bond Member SOA Join Date: Jul 2012 College: kfupm Posts: 63
Variance of the sum

Hi guys,

I want to ask the following:
If X1,X2,...,Xm are iid bernoulli with q. And q is beta with a=1, b=1, and theta=1.

Let S=x1+x2+...+xm

what is the variance of S20?

We know that Var(S20)=E(Var(s given q))+Var(E(S given q))
Now what confuses me is that should we say
Var(E(S given q)) = Var(E(x1 given q)+(x2 given q)+...+(x20 given q))=Var(q+q+...+q)=Var(q)+Var(q)+..Var(q)=20*Var(q )

or Var(E(S given q)) = Var(20*q)=400 * Var(q)?

When we say variance of the sum=sum of the variance and when should we square the number of terms?

Any help will be appreciated, and thanks in advance!
__________________
P FM IFM VEE VEE VEE LTAM STAM SRM FAP
APC PA
#2
01-29-2019, 02:18 PM
 Jim Daniel Member SOA Join Date: Jan 2002 Location: Davis, CA College: Wabash College B.A. 1962, Stanford Ph.D. 1965 Posts: 2,720

Quote:
 Originally Posted by Bond Hi guys, I want to ask the following: If X1,X2,...,Xm are iid bernoulli with q. And q is beta with a=1, b=1, and theta=1. Let S=x1+x2+...+xm what is the variance of S20? We know that Var(S20)=E(Var(s given q))+Var(E(S given q)) Now what confuses me is that should we say Var(E(S given q)) = Var(E(x1 given q)+(x2 given q)+...+(x20 given q))=Var(q+q+...+q)=Var(q)+Var(q)+..Var(q)=20*Var(q ) or Var(E(S given q)) = Var(20*q)=400 * Var(q)? When we say variance of the sum=sum of the variance and when should we square the number of terms? Any help will be appreciated, and thanks in advance!
You really ought to notice that S20, given q, is a Binomial random variable with m=20 trials and probability of "success" q. That makes it simpler, and the fact is worth knowing.
__________________
Jim Daniel
Jim Daniel's Actuarial Seminars
www.actuarialseminars.com
jimdaniel@actuarialseminars.com
#3
01-30-2019, 09:54 PM
 gauchodelpaso Member SOA Join Date: Feb 2012 College: Eastern Michigan U Posts: 145

I will attempt here to solve with more details, but I am sure I may be prone to errors, so please point them out to me.

For the case of the sum of 20 iid Bernoulli that make one binomial distribution Y with m=20:

The example given of the beta distribution for q is a veiled form a continuous uniform distribution between 0 and 1. Therefore if B is subindex for Binomial and U for the Uniform

$E_U [q] = 0.5 , E_U [q^2]= 1/3 , Var_U (q)=1/12.$

As Jim Daniel pointed out the sum of the 20 Bernoulli X with q as a parameter, is a Binomial Y with m=20 and q.

The expected value is $E_B [ Y|q] = mq = 20 q$

The variance is $Var_B (Y|q) = mq(1-q) = 20q -20q^2$

Therefore

$E[Y] = E_{U}[E_{B}[Y|q]] = E_U [20q] = 20 * 0.5 = 10$

$Var(Y) = E_{U}[Var_B (Y|q)] + Var_{U}[E_B (Y|q)] = E_{U} [20q - 20q^2] + Var_{U}(20q) =$

$= 20 E_U [q] - 20 E_U [q^2] + 400 Var _U (q) = 20 * 0.5 - 20 * 1/3 + 400 * 1/12 = 36.67$
__________________

German
______________
Prelims: 1/P - 2/FM - 3F/MFE - LTAM - STAM
VEE: Economics - Corporate Finance - Applied Statistics

Last edited by gauchodelpaso; 02-01-2019 at 12:16 PM.. Reason: confusing - error quoting
#4
01-31-2019, 05:37 PM
 Academic Actuary Member Join Date: Sep 2009 Posts: 8,972

Quote:
 Originally Posted by gauchodelpaso In reality I find easier to understand the sum of RV, if I explicitly write $S= X_1 + X_2 + ... + X_{20}$ and then $Var(S) = Var (X_1 + X_2 + ... + X_{20}) = Var(X_1) + Var(X_2) +...+ Var(X_{20})$ and then knowing they are all iid, each $Var(X_i) = Var(X)$ and then $Var(S) =Var(X) + Var(X) +...+ Var(X) = 20 Var(X)$ That avoids the confusing sum S= X+X+...+X prompting to say S=20X
I don't think that works here as the X's are conditionally independent given q.

It would work if each X had its own q drawn from the uniform.
#5
02-01-2019, 01:05 AM
 gauchodelpaso Member SOA Join Date: Feb 2012 College: Eastern Michigan U Posts: 145

Quote:
 Originally Posted by Academic Actuary I don't think that works here as the X's are conditionally independent given q. It would work if each X had its own q drawn from the uniform.

FINAL NOTE
I doubt most what I had shown here, so I will delete in my prior postings the questionable or confusing parts (like Z=20X).
What I found was that this has been extensively discussed related to questions in prior exams for a different beta (C-Fall2006, Q9 = sample SOA 253 and C-Spring 2007, Q3).
Basically, that we can't add variances when they are conditional in anything like q. Variance of sum is different than sum of variances. That applies only to the expected value with double expectation only (C-F06/9).
The sum of the variables being Bernoulli is a Binomial with m=20, as Dave pointed out. Then we apply double expectation for the variance, as I have shown (hopefully that was correct)(C-S07/3).
__________________

German
______________
Prelims: 1/P - 2/FM - 3F/MFE - LTAM - STAM
VEE: Economics - Corporate Finance - Applied Statistics

Last edited by gauchodelpaso; 02-01-2019 at 11:38 AM..
#6
02-01-2019, 10:22 AM
 Jim Daniel Member SOA Join Date: Jan 2002 Location: Davis, CA College: Wabash College B.A. 1962, Stanford Ph.D. 1965 Posts: 2,720

German,

The original post didn't say whether it was S | q---that is, the same q for all m of the Xj. [I think that this was an old exam question, and that that question said it was S | q.] With the same q for all Xj, as you said and as I posted earlier this makes S | q Binomial and the problem is straightforward from that point on.

With different q's for each Xj, you would not know that the set of Xj's was mutually independent and so the problem would be impossible.

Jim

Quote:
 Originally Posted by gauchodelpaso Good point. Should I add |q to each term? like $X_1|q$ would that be correct? Is that what you meant? I am completely lost. I am not sure if everything is wrong or just the expression is incorrect because I was missing the conditional portion. Let's say if all Xi are conditional on q, does it mean that given q (arbitrary on the uniform, let's say q=0.32), all of the 20 Bernoulli get the same parameter and then they are identically distributed, e.g. Pr(X=1) = 0.32, etc. It may the time in the night I am writing this. My brain is kaputt. I guess this is more difficult than I originally thought. Apparently it may be related to what is called the beta-binomial distribution. From Wikipedia: The beta-binomial distribution is the binomial distribution in which the probability of success at each trial is fixed but randomly drawn from a beta distribution prior to n Bernoulli trials. Perhaps somebody can guide us into this dark cavern.
__________________
Jim Daniel
Jim Daniel's Actuarial Seminars
www.actuarialseminars.com
jimdaniel@actuarialseminars.com
#7
02-01-2019, 10:50 AM
 Academic Actuary Member Join Date: Sep 2009 Posts: 8,972

Quote:
 Originally Posted by Jim Daniel German, The original post didn't say whether it was S | q---that is, the same q for all m of the Xj. [I think that this was an old exam question, and that that question said it was S | q.] With the same q for all Xj, as you said and as I posted earlier this makes S | q Binomial and the problem is straightforward from that point on. With different q's for each Xj, you would not know that the set of Xj's was mutually independent and so the problem would be impossible. Jim
If the q's were drawn independently for each X, why wouldn't the X's be mutually independent?
#8
02-01-2019, 12:03 PM
 Jim Daniel Member SOA Join Date: Jan 2002 Location: Davis, CA College: Wabash College B.A. 1962, Stanford Ph.D. 1965 Posts: 2,720

Quote:
 Originally Posted by Academic Actuary If the q's were drawn independently for each X, why wouldn't the X's be mutually independent?
The q's can't be drawn independently for each X. Once q is given, the distribution of each X is determined.

Suppose a variable q can be 0 or 1, 50/50.

Suppose that X | q = 0 can be 1 or 2, 50/50.

Suppose that X | q = 1 can be 3 or 4, 50/50.

Suppose that Y | q = 0 can be 3 or 4, 50/50.

Suppose that Y | q = 1 can be 1 or 2, 50/50.

Suppose that, given q, X and Y are mutually independent.

Compute E[XY] - E[X] E[Y] for the unconditional X and Y. It's not 0.
__________________
Jim Daniel
Jim Daniel's Actuarial Seminars
www.actuarialseminars.com
jimdaniel@actuarialseminars.com

Last edited by Jim Daniel; 02-01-2019 at 12:07 PM.. Reason: Clarification
#9
02-01-2019, 12:24 PM
 gauchodelpaso Member SOA Join Date: Feb 2012 College: Eastern Michigan U Posts: 145

Quote:
 Originally Posted by Jim Daniel German, The original post didn't say whether it was S | q---that is, the same q for all m of the Xj. [I think that this was an old exam question, and that that question said it was S | q.] With the same q for all Xj, as you said and as I posted earlier this makes S | q Binomial and the problem is straightforward from that point on. With different q's for each Xj, you would not know that the set of Xj's was mutually independent and so the problem would be impossible. Jim
Yes, Jim, I believe it was Exam C Spring 2007, question 3, with a different beta.

"You are given:
(i) Conditional on Q = q, the random variables X1, X2 ,…, Xm are independent and follow
a Bernoulli distribution with parameter q.
(ii) m 1 2 m S = X + X +􀀢+ X
(iii) The distribution of Q is beta with a = 1, b = 99, and θ = 1.
Determine the variance of the marginal distribution of S101."

Yes, I has to be the same q for all Xi, in order to make it a binomial. From the little I read this mixture is a binomial-beta (or beta-binomial) distribution in general (LM page108, example 7.12 briefly touches it). And that q has to be the same for all Bernoulli Xi as per Wikipedia: https://en.wikipedia.org/wiki/Beta-b...l_distribution. Quoting from Wiki: "In probability theory and statistics, the beta-binomial distribution is a family of discrete probability distributions on a finite support of non-negative integers arising when the probability of success in each of a fixed or known number of Bernoulli trials is either unknown or random. The beta-binomial distribution is the binomial distribution in which the probability of success at each trial is fixed but randomly drawn from a beta distribution prior to n Bernoulli trials.""

And as Academic Actuary and you pointed out, it may be confusing if it's an independent q for each Xi. Perhaps it has to do with how the model is created, like if you assign a random q for all Xi, or you draw a random q for each Xi. My knowledge is so poor that I don't know if anything like that has an intrinsic formulaic solution.

Million thanks to both of you. Now, I guess we need to know if Bond (James Bond?) is satisfied with the answers...
__________________

German
______________
Prelims: 1/P - 2/FM - 3F/MFE - LTAM - STAM
VEE: Economics - Corporate Finance - Applied Statistics

Last edited by gauchodelpaso; 02-01-2019 at 12:46 PM.. Reason: thanking
#10
02-01-2019, 01:04 PM
 Academic Actuary Member Join Date: Sep 2009 Posts: 8,972

What I am saying is assume you have an urn with different coins with the probability of heads on the coins varying according to a beta distribution. You draw 20 different coins with replacement and flip them where Xi is one if you have a head on the ith flip. The xi's are mutually independent so the variance of the sum will be of the variance of an individual flip: ( E[p(1-p)] + V(p) ) x number of flips

 Thread Tools Search this Thread Search this Thread: Advanced Search Display Modes Linear Mode

 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

All times are GMT -4. The time now is 10:01 AM.

 -- Default Style - Fluid Width ---- Default Style - Fixed Width ---- Old Default Style ---- Easy on the eyes ---- Smooth Darkness ---- Chestnut ---- Apple-ish Style ---- If Apples were blue ---- If Apples were green ---- If Apples were purple ---- Halloween 2007 ---- B&W ---- Halloween ---- AO Christmas Theme ---- Turkey Day Theme ---- AO 2007 beta ---- 4th Of July Contact Us - Actuarial Outpost - Archive - Privacy Statement - Top