The Correlation Between Two Random Variables in A Coin-Tossing Experiment

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

The Correlation between Two Random Variables in a

Coin-Tossing Experiment

KEYWORDS: Jyoti P. Shiwalkar


Teaching; Hislop College, Nagpur, India.
Binomial; e-mail: jyotishiwalkar@rediffmail.com
Negative binomial;
Correlation coefficient;
Stopping rule.
M.N. Deshpande
Nagpur, India.
e-mail: dpratap_ngp@sancharnet.in

Summary
We find the correlation of two jointly distributed
random variables connected with a coin tossing
experiment. The marginal distributions are bino-
mial and negative binomial.

correlation between these two random variables


䉬 INTRODUCTION 䉬 should be negative.

I n this article, we study two random variables


associated with a sequential coin-tossing experi-
THE DISTRIBUTIONS OF
ment and obtain the correlation coefficient between 䉬 䉬
them. The marginal distributions will be seen to be Dr AND Tr
binomial and negative binomial. Our sequential
experiment, then, provides instructors with an A coin that has a probability p of getting a head is
example that can be used to review binomial and tossed sequentially until r + 1 heads are obtained.
negative binomial random variables, as well as illus- Now, before the (r + 1)th head (corresponding to the
trate joint calculations between these two random last toss), there are r heads that allow the sequence to
variables. be separated into r partitions (or gaps). Double
heads correspond to a gap of zero length and occur
We now state the following stopping rule for termi- with chance p. Therefore, the random variable Dr,
nating the sequential tossing of the coin and define denoting the number of double heads in the string,
the two random variables under study. follows a binomial distribution, with p as the prob-
ability of success and r as the number of trials. Thus,

Stopping rule E ( Dr ) = rp,Var ( Dr ) = rpq (1)


where q = 1 - p.
A coin with p (0 < p < 1) as the probability of getting
a head is tossed sequentially until we get r + 1 heads, Since Tr denotes the number of tails observed in the
where r is a predetermined positive integer. string, when the coin is flipped until (r + 1) heads are
obtained, Tr + r + 1 is a random variable having a
We will let Dr denote the number of double heads negative binomial distribution. Therefore,
(HH, overlaps counted) and Tr denote the number
of tails. To illustrate, with r = 4 we toss the coin until
⎛ x + r⎞ r +1 x
we get 5 heads. For the sequence of tosses indicated P (Tr = x ) = ⎜ p q , x = 0, 1, 2, 3, . . .
⎝ r ⎟⎠
by the string THTHTTHHH, we have Dr = 2 and
Tr = 4. and

( r + 1) q ( r + 1) q
In the following section, we examine the distribu- E (Tr ) = ,Var (Tr ) = (2)
tions of Dr and Tr. It is intuitively clear that the p p2

© 2009 The Authors


Journal compilation © 2009 Teaching Statistics Trust
Teaching Statistics. Volume 31, Number 2, Summer 2009 • 47
We next obtain the correlation coefficient between which implies (see, e.g. Jordan 1960)
Dr and Tr.
E ( DrTr ) = r 2 q + c
䉬 THE CORRELATION COEFFICIENT 䉬
for some fixed constant c. A bit of calculation
th
After the r head, the next toss results in a head, reveals, for example, that E(DrTr) = q when r = 1 so
with chance p giving an additional double heads but that c = 0.
no increase in the number of tails. Instead, x ⱖ 1
tails may occur after the rth head prior to the (r + 1)th Consequently, we may compute the covariance and
head. This happens with chance pqx and gives rise to correlation between Dr and Tr. In particular, using
x additional tails with no additional double heads. (1) and (2) along with E(DrTr) = r2q, we have

It follows, then, that Cov ( Dr , Tr ) = E ( DrTr ) − E ( Dr ) E (Tr )


( r + 1) q
Dr +1Tr +1 = r 2 q − ( rp) = − rq
p
= { ( Dr + 1)Tr with probability p
Dr (Tr + x ) with probability pq x, x = 1, 2, . . .
and

Cov ( Dr , Tr ) − rq
giving ρ ( Dr , Tr ) = =
Var ( Dr )Var (Tr ) ( r + 1) q
rpq ⋅
E ( Dr +1Tr +1) = pE ( DrTr ) + pE (Tr ) p2
p
∞ ∞
=−
+ E ( DrTr ) ∑ pq x + E ( Dr ) ∑ xpq x (1 + 1 r )
x =1 x =1

Note that, as expected, the covariance and correla-


The leftmost sum above, a geometric series, is equal tion are negative. Also note that the absolute value
to 1 - p. To evaluate the rightmost sum, note of the correlation is increasing both in p and in r.
∞ ∞ d x d ∞ d
that ∑ x =1 xq = q ∑ x =1 q = q ∑ x =1 q = q
x x

dq dq dq Acknowledgements
⎡ 1 ⎤ q
⎢⎣1 − q − 1⎥⎦ = p 2 . Consequently, the rightmost sum The authors are thankful to the honourable referee
and the editor for their valuable suggestions in
in the expression for E(Dr+1Tr+1) is q/p, and using the
improving the earlier draft of this article.
expressions for the expected values in (1) and (2), we
obtain
( r + 1) q ⎛ q⎞
E ( Dr +1Tr +1) = E ( DrTr ) + p ⋅ + rp ⋅ ⎜ ⎟ Reference
p ⎝ p⎠
Jordan, C. (1960). Calculus of Finite Differences
or
(2nd edn). New York: Chelsea Publishing.
ΔE ( DrTr ) ≡ E ( Dr +1Tr +1) − E ( DrTr ) = ( 2r + 1) q

48 • Teaching Statistics. Volume 31, Number 2, Summer 2009 © 2009 The Authors
Journal compilation © 2009 Teaching Statistics Trust

You might also like