Expected Value for uniform random permutations
Question:
Let $ngeq 2$ be an integer and let $a_1, a_2, ..., a_n$ be a uniformly random permutation of the set ${1,2,...n}$. Let $X$ be the random variable with value:
$X$ = the number of indices $i$ with $1 leq i leq n-1$ and $a_i < a_{i+1}$
For example, if $n = 6$ and the permutation is $3, 5, 4, 1, 6, 2$ then $X = 2$.
What is the expected value $E(X)$ of $X$? Use indicator variables.
Answer: $frac{n-1}{2}$
I define my indicator variable:
$$
X = left{begin{array}{rc} 1,&text{the number of indices i with 1 $<=$ i $<=$ $n-1$ and $a_i < a_{i+1}$ }{} \ 0,&text{other cases}{}end{array}right.
$$
For $n=2$: {1,2} , {2,1} so $Pr = $ $frac{1}{2}$
$E(X) =$ $P(X_2) =$ $frac{1}{2}$
For $n=3$: {1,2, 3} , {1,3,2} , {2,3,1} so $Pr = $ $frac{3}{6}$
Is this the correct method to solve this? I did this for $n$ values but when I computed there result with the answers, I never got it to be the same. How do I solve this?
probability probability-theory permutations random-variables expected-value
add a comment |
Question:
Let $ngeq 2$ be an integer and let $a_1, a_2, ..., a_n$ be a uniformly random permutation of the set ${1,2,...n}$. Let $X$ be the random variable with value:
$X$ = the number of indices $i$ with $1 leq i leq n-1$ and $a_i < a_{i+1}$
For example, if $n = 6$ and the permutation is $3, 5, 4, 1, 6, 2$ then $X = 2$.
What is the expected value $E(X)$ of $X$? Use indicator variables.
Answer: $frac{n-1}{2}$
I define my indicator variable:
$$
X = left{begin{array}{rc} 1,&text{the number of indices i with 1 $<=$ i $<=$ $n-1$ and $a_i < a_{i+1}$ }{} \ 0,&text{other cases}{}end{array}right.
$$
For $n=2$: {1,2} , {2,1} so $Pr = $ $frac{1}{2}$
$E(X) =$ $P(X_2) =$ $frac{1}{2}$
For $n=3$: {1,2, 3} , {1,3,2} , {2,3,1} so $Pr = $ $frac{3}{6}$
Is this the correct method to solve this? I did this for $n$ values but when I computed there result with the answers, I never got it to be the same. How do I solve this?
probability probability-theory permutations random-variables expected-value
add a comment |
Question:
Let $ngeq 2$ be an integer and let $a_1, a_2, ..., a_n$ be a uniformly random permutation of the set ${1,2,...n}$. Let $X$ be the random variable with value:
$X$ = the number of indices $i$ with $1 leq i leq n-1$ and $a_i < a_{i+1}$
For example, if $n = 6$ and the permutation is $3, 5, 4, 1, 6, 2$ then $X = 2$.
What is the expected value $E(X)$ of $X$? Use indicator variables.
Answer: $frac{n-1}{2}$
I define my indicator variable:
$$
X = left{begin{array}{rc} 1,&text{the number of indices i with 1 $<=$ i $<=$ $n-1$ and $a_i < a_{i+1}$ }{} \ 0,&text{other cases}{}end{array}right.
$$
For $n=2$: {1,2} , {2,1} so $Pr = $ $frac{1}{2}$
$E(X) =$ $P(X_2) =$ $frac{1}{2}$
For $n=3$: {1,2, 3} , {1,3,2} , {2,3,1} so $Pr = $ $frac{3}{6}$
Is this the correct method to solve this? I did this for $n$ values but when I computed there result with the answers, I never got it to be the same. How do I solve this?
probability probability-theory permutations random-variables expected-value
Question:
Let $ngeq 2$ be an integer and let $a_1, a_2, ..., a_n$ be a uniformly random permutation of the set ${1,2,...n}$. Let $X$ be the random variable with value:
$X$ = the number of indices $i$ with $1 leq i leq n-1$ and $a_i < a_{i+1}$
For example, if $n = 6$ and the permutation is $3, 5, 4, 1, 6, 2$ then $X = 2$.
What is the expected value $E(X)$ of $X$? Use indicator variables.
Answer: $frac{n-1}{2}$
I define my indicator variable:
$$
X = left{begin{array}{rc} 1,&text{the number of indices i with 1 $<=$ i $<=$ $n-1$ and $a_i < a_{i+1}$ }{} \ 0,&text{other cases}{}end{array}right.
$$
For $n=2$: {1,2} , {2,1} so $Pr = $ $frac{1}{2}$
$E(X) =$ $P(X_2) =$ $frac{1}{2}$
For $n=3$: {1,2, 3} , {1,3,2} , {2,3,1} so $Pr = $ $frac{3}{6}$
Is this the correct method to solve this? I did this for $n$ values but when I computed there result with the answers, I never got it to be the same. How do I solve this?
probability probability-theory permutations random-variables expected-value
probability probability-theory permutations random-variables expected-value
edited Dec 2 '18 at 19:27
greedoid
38.2k114795
38.2k114795
asked Dec 2 '18 at 18:38
Toby
1577
1577
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
If you define
$$I_i = begin{cases} 1 & a_i < a_{i+1} \ 0 & a_i ge a_{i+1}end{cases}$$
for $1 le i le n-1$,
then $X = I_1 + I_2 + cdots + I_{n-1}$ so
$$E[X] = E[I_1 + cdots + I_{n-1}] = E[I_1] + cdots + E[I_{n-1}] = P(a_1 < a_2) + cdots + P(a_{n-1} < a_n).$$
Can you take it from here?
I'm kind of lost on what you are doing. Can you please elaborate.
– Toby
Dec 2 '18 at 19:00
I've defined an indicator variable $I_1$ for the event ${a_1 < a_2}$, and so on for the other events ${a_i < a_{i+1}}$. This allows me to write $X$ as the sum of indicator variables. From there, calculating the expectation of $X$ reduces to computing the expectation of each indicator variable.
– angryavian
Dec 2 '18 at 19:08
add a comment |
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3023022%2fexpected-value-for-uniform-random-permutations%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
If you define
$$I_i = begin{cases} 1 & a_i < a_{i+1} \ 0 & a_i ge a_{i+1}end{cases}$$
for $1 le i le n-1$,
then $X = I_1 + I_2 + cdots + I_{n-1}$ so
$$E[X] = E[I_1 + cdots + I_{n-1}] = E[I_1] + cdots + E[I_{n-1}] = P(a_1 < a_2) + cdots + P(a_{n-1} < a_n).$$
Can you take it from here?
I'm kind of lost on what you are doing. Can you please elaborate.
– Toby
Dec 2 '18 at 19:00
I've defined an indicator variable $I_1$ for the event ${a_1 < a_2}$, and so on for the other events ${a_i < a_{i+1}}$. This allows me to write $X$ as the sum of indicator variables. From there, calculating the expectation of $X$ reduces to computing the expectation of each indicator variable.
– angryavian
Dec 2 '18 at 19:08
add a comment |
If you define
$$I_i = begin{cases} 1 & a_i < a_{i+1} \ 0 & a_i ge a_{i+1}end{cases}$$
for $1 le i le n-1$,
then $X = I_1 + I_2 + cdots + I_{n-1}$ so
$$E[X] = E[I_1 + cdots + I_{n-1}] = E[I_1] + cdots + E[I_{n-1}] = P(a_1 < a_2) + cdots + P(a_{n-1} < a_n).$$
Can you take it from here?
I'm kind of lost on what you are doing. Can you please elaborate.
– Toby
Dec 2 '18 at 19:00
I've defined an indicator variable $I_1$ for the event ${a_1 < a_2}$, and so on for the other events ${a_i < a_{i+1}}$. This allows me to write $X$ as the sum of indicator variables. From there, calculating the expectation of $X$ reduces to computing the expectation of each indicator variable.
– angryavian
Dec 2 '18 at 19:08
add a comment |
If you define
$$I_i = begin{cases} 1 & a_i < a_{i+1} \ 0 & a_i ge a_{i+1}end{cases}$$
for $1 le i le n-1$,
then $X = I_1 + I_2 + cdots + I_{n-1}$ so
$$E[X] = E[I_1 + cdots + I_{n-1}] = E[I_1] + cdots + E[I_{n-1}] = P(a_1 < a_2) + cdots + P(a_{n-1} < a_n).$$
Can you take it from here?
If you define
$$I_i = begin{cases} 1 & a_i < a_{i+1} \ 0 & a_i ge a_{i+1}end{cases}$$
for $1 le i le n-1$,
then $X = I_1 + I_2 + cdots + I_{n-1}$ so
$$E[X] = E[I_1 + cdots + I_{n-1}] = E[I_1] + cdots + E[I_{n-1}] = P(a_1 < a_2) + cdots + P(a_{n-1} < a_n).$$
Can you take it from here?
edited Dec 2 '18 at 19:08
answered Dec 2 '18 at 18:45
angryavian
39.1k23180
39.1k23180
I'm kind of lost on what you are doing. Can you please elaborate.
– Toby
Dec 2 '18 at 19:00
I've defined an indicator variable $I_1$ for the event ${a_1 < a_2}$, and so on for the other events ${a_i < a_{i+1}}$. This allows me to write $X$ as the sum of indicator variables. From there, calculating the expectation of $X$ reduces to computing the expectation of each indicator variable.
– angryavian
Dec 2 '18 at 19:08
add a comment |
I'm kind of lost on what you are doing. Can you please elaborate.
– Toby
Dec 2 '18 at 19:00
I've defined an indicator variable $I_1$ for the event ${a_1 < a_2}$, and so on for the other events ${a_i < a_{i+1}}$. This allows me to write $X$ as the sum of indicator variables. From there, calculating the expectation of $X$ reduces to computing the expectation of each indicator variable.
– angryavian
Dec 2 '18 at 19:08
I'm kind of lost on what you are doing. Can you please elaborate.
– Toby
Dec 2 '18 at 19:00
I'm kind of lost on what you are doing. Can you please elaborate.
– Toby
Dec 2 '18 at 19:00
I've defined an indicator variable $I_1$ for the event ${a_1 < a_2}$, and so on for the other events ${a_i < a_{i+1}}$. This allows me to write $X$ as the sum of indicator variables. From there, calculating the expectation of $X$ reduces to computing the expectation of each indicator variable.
– angryavian
Dec 2 '18 at 19:08
I've defined an indicator variable $I_1$ for the event ${a_1 < a_2}$, and so on for the other events ${a_i < a_{i+1}}$. This allows me to write $X$ as the sum of indicator variables. From there, calculating the expectation of $X$ reduces to computing the expectation of each indicator variable.
– angryavian
Dec 2 '18 at 19:08
add a comment |
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.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- 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.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3023022%2fexpected-value-for-uniform-random-permutations%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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