Expected value for bit strings using indicator random variables?












1












$begingroup$


So the problem states that let n>=2 be an integer, Consider a bitstring $b_1$; $b_2$;...;$b_n$ of length n, in which each bit $b_i$ is 0 with probability 1/2, and 1 with probability 1/2 (independent of all other bits).



Define the random variable X to be the number of indices i with 1<=i< n for which $b_i$$b_{i+1}$ = 0.



What is the expected value E(X) of the random variable X? [Use indicator random variables] The answer for this is ${3(n-1)over4}$



My first shot at this!



I am particularly confused on how to properly use the indicator functions/variables. For this question, I'm assuming it should be P(X=1) = 1/2 for the indicator variable.



There's also this constraint of bi*bi+1 = 0, so I'm assuming one of bi or bi+1 has to be 0. I'm not sure exactly how to properly assess the data given in the problem and apply the Expected value formula. It would be greatly appreciated if somebody could help me break down this problem so I have a better understanding :)










share|cite|improve this question











$endgroup$












  • $begingroup$
    mathjax guide. For starter, surround mathematical object with dollar signs.
    $endgroup$
    – Siong Thye Goh
    Nov 27 '18 at 4:00










  • $begingroup$
    oh thank you for this :) I was wondering how to edit the mathematical notations.
    $endgroup$
    – Ashley McHale
    Nov 27 '18 at 4:02










  • $begingroup$
    How could $(b_itimes b_i)+1=0$ if $b_i$ takes on the values ${0,,1}$?
    $endgroup$
    – BlackMath
    Nov 27 '18 at 4:22












  • $begingroup$
    Hey, that's my bad. I had an editing error! Stilll getting used to this
    $endgroup$
    – Ashley McHale
    Nov 27 '18 at 4:25
















1












$begingroup$


So the problem states that let n>=2 be an integer, Consider a bitstring $b_1$; $b_2$;...;$b_n$ of length n, in which each bit $b_i$ is 0 with probability 1/2, and 1 with probability 1/2 (independent of all other bits).



Define the random variable X to be the number of indices i with 1<=i< n for which $b_i$$b_{i+1}$ = 0.



What is the expected value E(X) of the random variable X? [Use indicator random variables] The answer for this is ${3(n-1)over4}$



My first shot at this!



I am particularly confused on how to properly use the indicator functions/variables. For this question, I'm assuming it should be P(X=1) = 1/2 for the indicator variable.



There's also this constraint of bi*bi+1 = 0, so I'm assuming one of bi or bi+1 has to be 0. I'm not sure exactly how to properly assess the data given in the problem and apply the Expected value formula. It would be greatly appreciated if somebody could help me break down this problem so I have a better understanding :)










share|cite|improve this question











$endgroup$












  • $begingroup$
    mathjax guide. For starter, surround mathematical object with dollar signs.
    $endgroup$
    – Siong Thye Goh
    Nov 27 '18 at 4:00










  • $begingroup$
    oh thank you for this :) I was wondering how to edit the mathematical notations.
    $endgroup$
    – Ashley McHale
    Nov 27 '18 at 4:02










  • $begingroup$
    How could $(b_itimes b_i)+1=0$ if $b_i$ takes on the values ${0,,1}$?
    $endgroup$
    – BlackMath
    Nov 27 '18 at 4:22












  • $begingroup$
    Hey, that's my bad. I had an editing error! Stilll getting used to this
    $endgroup$
    – Ashley McHale
    Nov 27 '18 at 4:25














1












1








1


1



$begingroup$


So the problem states that let n>=2 be an integer, Consider a bitstring $b_1$; $b_2$;...;$b_n$ of length n, in which each bit $b_i$ is 0 with probability 1/2, and 1 with probability 1/2 (independent of all other bits).



Define the random variable X to be the number of indices i with 1<=i< n for which $b_i$$b_{i+1}$ = 0.



What is the expected value E(X) of the random variable X? [Use indicator random variables] The answer for this is ${3(n-1)over4}$



My first shot at this!



I am particularly confused on how to properly use the indicator functions/variables. For this question, I'm assuming it should be P(X=1) = 1/2 for the indicator variable.



There's also this constraint of bi*bi+1 = 0, so I'm assuming one of bi or bi+1 has to be 0. I'm not sure exactly how to properly assess the data given in the problem and apply the Expected value formula. It would be greatly appreciated if somebody could help me break down this problem so I have a better understanding :)










share|cite|improve this question











$endgroup$




So the problem states that let n>=2 be an integer, Consider a bitstring $b_1$; $b_2$;...;$b_n$ of length n, in which each bit $b_i$ is 0 with probability 1/2, and 1 with probability 1/2 (independent of all other bits).



Define the random variable X to be the number of indices i with 1<=i< n for which $b_i$$b_{i+1}$ = 0.



What is the expected value E(X) of the random variable X? [Use indicator random variables] The answer for this is ${3(n-1)over4}$



My first shot at this!



I am particularly confused on how to properly use the indicator functions/variables. For this question, I'm assuming it should be P(X=1) = 1/2 for the indicator variable.



There's also this constraint of bi*bi+1 = 0, so I'm assuming one of bi or bi+1 has to be 0. I'm not sure exactly how to properly assess the data given in the problem and apply the Expected value formula. It would be greatly appreciated if somebody could help me break down this problem so I have a better understanding :)







probability probability-theory random-variables expected-value






share|cite|improve this question















share|cite|improve this question













share|cite|improve this question




share|cite|improve this question








edited Nov 27 '18 at 4:24







Ashley McHale

















asked Nov 27 '18 at 3:52









Ashley McHaleAshley McHale

63




63












  • $begingroup$
    mathjax guide. For starter, surround mathematical object with dollar signs.
    $endgroup$
    – Siong Thye Goh
    Nov 27 '18 at 4:00










  • $begingroup$
    oh thank you for this :) I was wondering how to edit the mathematical notations.
    $endgroup$
    – Ashley McHale
    Nov 27 '18 at 4:02










  • $begingroup$
    How could $(b_itimes b_i)+1=0$ if $b_i$ takes on the values ${0,,1}$?
    $endgroup$
    – BlackMath
    Nov 27 '18 at 4:22












  • $begingroup$
    Hey, that's my bad. I had an editing error! Stilll getting used to this
    $endgroup$
    – Ashley McHale
    Nov 27 '18 at 4:25


















  • $begingroup$
    mathjax guide. For starter, surround mathematical object with dollar signs.
    $endgroup$
    – Siong Thye Goh
    Nov 27 '18 at 4:00










  • $begingroup$
    oh thank you for this :) I was wondering how to edit the mathematical notations.
    $endgroup$
    – Ashley McHale
    Nov 27 '18 at 4:02










  • $begingroup$
    How could $(b_itimes b_i)+1=0$ if $b_i$ takes on the values ${0,,1}$?
    $endgroup$
    – BlackMath
    Nov 27 '18 at 4:22












  • $begingroup$
    Hey, that's my bad. I had an editing error! Stilll getting used to this
    $endgroup$
    – Ashley McHale
    Nov 27 '18 at 4:25
















$begingroup$
mathjax guide. For starter, surround mathematical object with dollar signs.
$endgroup$
– Siong Thye Goh
Nov 27 '18 at 4:00




$begingroup$
mathjax guide. For starter, surround mathematical object with dollar signs.
$endgroup$
– Siong Thye Goh
Nov 27 '18 at 4:00












$begingroup$
oh thank you for this :) I was wondering how to edit the mathematical notations.
$endgroup$
– Ashley McHale
Nov 27 '18 at 4:02




$begingroup$
oh thank you for this :) I was wondering how to edit the mathematical notations.
$endgroup$
– Ashley McHale
Nov 27 '18 at 4:02












$begingroup$
How could $(b_itimes b_i)+1=0$ if $b_i$ takes on the values ${0,,1}$?
$endgroup$
– BlackMath
Nov 27 '18 at 4:22






$begingroup$
How could $(b_itimes b_i)+1=0$ if $b_i$ takes on the values ${0,,1}$?
$endgroup$
– BlackMath
Nov 27 '18 at 4:22














$begingroup$
Hey, that's my bad. I had an editing error! Stilll getting used to this
$endgroup$
– Ashley McHale
Nov 27 '18 at 4:25




$begingroup$
Hey, that's my bad. I had an editing error! Stilll getting used to this
$endgroup$
– Ashley McHale
Nov 27 '18 at 4:25










1 Answer
1






active

oldest

votes


















0












$begingroup$

Let $$X_i = begin{cases} 1 &, text{ if } b_ib_{i+1}=0 \0 &, text{ if }b_ib_{i+1} =1 & end{cases}$$



where $i in {1, ldots, n-1}$.



We have $E[X_i] = frac34$ since I just need one of the bit to be $0$.



Hence $E[X] =E[sum_{i=1}^{n-1} X_i]= frac34(n-1)$.






share|cite|improve this answer









$endgroup$













  • $begingroup$
    If you don't mind clarifying, how do you determine the X values of 0 and 1 for bi*bi+1? Also, how is the expected value calculated to be 3/4?
    $endgroup$
    – Ashley McHale
    Nov 27 '18 at 4:05










  • $begingroup$
    I let the event of interest be $1$. That is when $b_ib_{i+1}=0$. $frac34$ is the probability that $b_i=0$ or $b_{i+1}=0$. It can be either computed by inclusion exclusion or we can just subtract the complement.
    $endgroup$
    – Siong Thye Goh
    Nov 27 '18 at 4:14










  • $begingroup$
    Alright, and why are your bounds starting from n-1?
    $endgroup$
    – Ashley McHale
    Nov 27 '18 at 4:21










  • $begingroup$
    hmmm... i don't understand the previous doubt
    $endgroup$
    – Siong Thye Goh
    Nov 27 '18 at 4:22










  • $begingroup$
    Sorry, your summation for the expected value starts from i=1 to n-1. I was just wondering where the n-1 came from? Also, I am still not able to find the probability to be 3/4 for some reason.
    $endgroup$
    – Ashley McHale
    Nov 27 '18 at 4:26













Your Answer





StackExchange.ifUsing("editor", function () {
return StackExchange.using("mathjaxEditing", function () {
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
});
});
}, "mathjax-editing");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "69"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3015307%2fexpected-value-for-bit-strings-using-indicator-random-variables%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









0












$begingroup$

Let $$X_i = begin{cases} 1 &, text{ if } b_ib_{i+1}=0 \0 &, text{ if }b_ib_{i+1} =1 & end{cases}$$



where $i in {1, ldots, n-1}$.



We have $E[X_i] = frac34$ since I just need one of the bit to be $0$.



Hence $E[X] =E[sum_{i=1}^{n-1} X_i]= frac34(n-1)$.






share|cite|improve this answer









$endgroup$













  • $begingroup$
    If you don't mind clarifying, how do you determine the X values of 0 and 1 for bi*bi+1? Also, how is the expected value calculated to be 3/4?
    $endgroup$
    – Ashley McHale
    Nov 27 '18 at 4:05










  • $begingroup$
    I let the event of interest be $1$. That is when $b_ib_{i+1}=0$. $frac34$ is the probability that $b_i=0$ or $b_{i+1}=0$. It can be either computed by inclusion exclusion or we can just subtract the complement.
    $endgroup$
    – Siong Thye Goh
    Nov 27 '18 at 4:14










  • $begingroup$
    Alright, and why are your bounds starting from n-1?
    $endgroup$
    – Ashley McHale
    Nov 27 '18 at 4:21










  • $begingroup$
    hmmm... i don't understand the previous doubt
    $endgroup$
    – Siong Thye Goh
    Nov 27 '18 at 4:22










  • $begingroup$
    Sorry, your summation for the expected value starts from i=1 to n-1. I was just wondering where the n-1 came from? Also, I am still not able to find the probability to be 3/4 for some reason.
    $endgroup$
    – Ashley McHale
    Nov 27 '18 at 4:26


















0












$begingroup$

Let $$X_i = begin{cases} 1 &, text{ if } b_ib_{i+1}=0 \0 &, text{ if }b_ib_{i+1} =1 & end{cases}$$



where $i in {1, ldots, n-1}$.



We have $E[X_i] = frac34$ since I just need one of the bit to be $0$.



Hence $E[X] =E[sum_{i=1}^{n-1} X_i]= frac34(n-1)$.






share|cite|improve this answer









$endgroup$













  • $begingroup$
    If you don't mind clarifying, how do you determine the X values of 0 and 1 for bi*bi+1? Also, how is the expected value calculated to be 3/4?
    $endgroup$
    – Ashley McHale
    Nov 27 '18 at 4:05










  • $begingroup$
    I let the event of interest be $1$. That is when $b_ib_{i+1}=0$. $frac34$ is the probability that $b_i=0$ or $b_{i+1}=0$. It can be either computed by inclusion exclusion or we can just subtract the complement.
    $endgroup$
    – Siong Thye Goh
    Nov 27 '18 at 4:14










  • $begingroup$
    Alright, and why are your bounds starting from n-1?
    $endgroup$
    – Ashley McHale
    Nov 27 '18 at 4:21










  • $begingroup$
    hmmm... i don't understand the previous doubt
    $endgroup$
    – Siong Thye Goh
    Nov 27 '18 at 4:22










  • $begingroup$
    Sorry, your summation for the expected value starts from i=1 to n-1. I was just wondering where the n-1 came from? Also, I am still not able to find the probability to be 3/4 for some reason.
    $endgroup$
    – Ashley McHale
    Nov 27 '18 at 4:26
















0












0








0





$begingroup$

Let $$X_i = begin{cases} 1 &, text{ if } b_ib_{i+1}=0 \0 &, text{ if }b_ib_{i+1} =1 & end{cases}$$



where $i in {1, ldots, n-1}$.



We have $E[X_i] = frac34$ since I just need one of the bit to be $0$.



Hence $E[X] =E[sum_{i=1}^{n-1} X_i]= frac34(n-1)$.






share|cite|improve this answer









$endgroup$



Let $$X_i = begin{cases} 1 &, text{ if } b_ib_{i+1}=0 \0 &, text{ if }b_ib_{i+1} =1 & end{cases}$$



where $i in {1, ldots, n-1}$.



We have $E[X_i] = frac34$ since I just need one of the bit to be $0$.



Hence $E[X] =E[sum_{i=1}^{n-1} X_i]= frac34(n-1)$.







share|cite|improve this answer












share|cite|improve this answer



share|cite|improve this answer










answered Nov 27 '18 at 3:57









Siong Thye GohSiong Thye Goh

100k1466117




100k1466117












  • $begingroup$
    If you don't mind clarifying, how do you determine the X values of 0 and 1 for bi*bi+1? Also, how is the expected value calculated to be 3/4?
    $endgroup$
    – Ashley McHale
    Nov 27 '18 at 4:05










  • $begingroup$
    I let the event of interest be $1$. That is when $b_ib_{i+1}=0$. $frac34$ is the probability that $b_i=0$ or $b_{i+1}=0$. It can be either computed by inclusion exclusion or we can just subtract the complement.
    $endgroup$
    – Siong Thye Goh
    Nov 27 '18 at 4:14










  • $begingroup$
    Alright, and why are your bounds starting from n-1?
    $endgroup$
    – Ashley McHale
    Nov 27 '18 at 4:21










  • $begingroup$
    hmmm... i don't understand the previous doubt
    $endgroup$
    – Siong Thye Goh
    Nov 27 '18 at 4:22










  • $begingroup$
    Sorry, your summation for the expected value starts from i=1 to n-1. I was just wondering where the n-1 came from? Also, I am still not able to find the probability to be 3/4 for some reason.
    $endgroup$
    – Ashley McHale
    Nov 27 '18 at 4:26




















  • $begingroup$
    If you don't mind clarifying, how do you determine the X values of 0 and 1 for bi*bi+1? Also, how is the expected value calculated to be 3/4?
    $endgroup$
    – Ashley McHale
    Nov 27 '18 at 4:05










  • $begingroup$
    I let the event of interest be $1$. That is when $b_ib_{i+1}=0$. $frac34$ is the probability that $b_i=0$ or $b_{i+1}=0$. It can be either computed by inclusion exclusion or we can just subtract the complement.
    $endgroup$
    – Siong Thye Goh
    Nov 27 '18 at 4:14










  • $begingroup$
    Alright, and why are your bounds starting from n-1?
    $endgroup$
    – Ashley McHale
    Nov 27 '18 at 4:21










  • $begingroup$
    hmmm... i don't understand the previous doubt
    $endgroup$
    – Siong Thye Goh
    Nov 27 '18 at 4:22










  • $begingroup$
    Sorry, your summation for the expected value starts from i=1 to n-1. I was just wondering where the n-1 came from? Also, I am still not able to find the probability to be 3/4 for some reason.
    $endgroup$
    – Ashley McHale
    Nov 27 '18 at 4:26


















$begingroup$
If you don't mind clarifying, how do you determine the X values of 0 and 1 for bi*bi+1? Also, how is the expected value calculated to be 3/4?
$endgroup$
– Ashley McHale
Nov 27 '18 at 4:05




$begingroup$
If you don't mind clarifying, how do you determine the X values of 0 and 1 for bi*bi+1? Also, how is the expected value calculated to be 3/4?
$endgroup$
– Ashley McHale
Nov 27 '18 at 4:05












$begingroup$
I let the event of interest be $1$. That is when $b_ib_{i+1}=0$. $frac34$ is the probability that $b_i=0$ or $b_{i+1}=0$. It can be either computed by inclusion exclusion or we can just subtract the complement.
$endgroup$
– Siong Thye Goh
Nov 27 '18 at 4:14




$begingroup$
I let the event of interest be $1$. That is when $b_ib_{i+1}=0$. $frac34$ is the probability that $b_i=0$ or $b_{i+1}=0$. It can be either computed by inclusion exclusion or we can just subtract the complement.
$endgroup$
– Siong Thye Goh
Nov 27 '18 at 4:14












$begingroup$
Alright, and why are your bounds starting from n-1?
$endgroup$
– Ashley McHale
Nov 27 '18 at 4:21




$begingroup$
Alright, and why are your bounds starting from n-1?
$endgroup$
– Ashley McHale
Nov 27 '18 at 4:21












$begingroup$
hmmm... i don't understand the previous doubt
$endgroup$
– Siong Thye Goh
Nov 27 '18 at 4:22




$begingroup$
hmmm... i don't understand the previous doubt
$endgroup$
– Siong Thye Goh
Nov 27 '18 at 4:22












$begingroup$
Sorry, your summation for the expected value starts from i=1 to n-1. I was just wondering where the n-1 came from? Also, I am still not able to find the probability to be 3/4 for some reason.
$endgroup$
– Ashley McHale
Nov 27 '18 at 4:26






$begingroup$
Sorry, your summation for the expected value starts from i=1 to n-1. I was just wondering where the n-1 came from? Also, I am still not able to find the probability to be 3/4 for some reason.
$endgroup$
– Ashley McHale
Nov 27 '18 at 4:26




















draft saved

draft discarded




















































Thanks for contributing an answer to Mathematics Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


Use MathJax to format equations. MathJax reference.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3015307%2fexpected-value-for-bit-strings-using-indicator-random-variables%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

mysqli_query(): Empty query in /home/lucindabrummitt/public_html/blog/wp-includes/wp-db.php on line 1924

How to change which sound is reproduced for terminal bell?

Can I use Tabulator js library in my java Spring + Thymeleaf project?