Mean and Variance of Continuous Random VariableMean and variance of call center dataPoisson random variable-...
How do you conduct xenoanthropology after first contact?
Can I make popcorn with any corn?
Why is this code 6.5x slower with optimizations enabled?
My colleague's body is amazing
I’m planning on buying a laser printer but concerned about the life cycle of toner in the machine
Non-Jewish family in an Orthodox Jewish Wedding
Extreme, but not acceptable situation and I can't start the work tomorrow morning
Why is "Reports" in sentence down without "The"
What are these boxed doors outside store fronts in New York?
Motorized valve interfering with button?
What Brexit solution does the DUP want?
How do I create uniquely male characters?
Why CLRS example on residual networks does not follows its formula?
Why doesn't Newton's third law mean a person bounces back to where they started when they hit the ground?
What does "enim et" mean?
What is GPS' 19 year rollover and does it present a cybersecurity issue?
Why are 150k or 200k jobs considered good when there are 300k+ births a month?
Prevent a directory in /tmp from being deleted
Should I join an office cleaning event for free?
least quadratic residue under GRH: an EXPLICIT bound
Why was the small council so happy for Tyrion to become the Master of Coin?
Calculus Optimization - Point on graph closest to given point
What is the meaning of "of trouble" in the following sentence?
Why Is Death Allowed In the Matrix?
Mean and Variance of Continuous Random Variable
Mean and variance of call center dataPoisson random variable- varianceHow to obtain variance of a random variable that depends on a hypergeometric variable?Variance reduction technique in Monte Carlo integrationVariance of a continuous uniformly distributed random variableWeighted sample mean and variance - asking for references and detailsCan the variance of a continuous random variable with known distribution be impossible to find?Mean and variance of the maximum of a random number of Uniform variablesApproximating the expected value and variance of the function of a (continuous univariate) random variableMean of maximum of exponential random variables (independent but not identical)
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}
$begingroup$
I have a problem on my homework about the continuous random variable $y$ where the cdf is $F(y)=frac{1}{(1+e^{-y})}$.
Part a is asking for the pdf which I found to be $frac{e^y}{(e^y+1)^2}$.
Part b asks for the mean and variance of $y$ but when I tried to find the $E(y)$, I got zero with the integral from $-infty$ to $infty$ of $frac{ye^y}{(e^y+1)^2}$. I'm not sure where I'm going wrong with this problem?
variance mean
New contributor
$endgroup$
add a comment |
$begingroup$
I have a problem on my homework about the continuous random variable $y$ where the cdf is $F(y)=frac{1}{(1+e^{-y})}$.
Part a is asking for the pdf which I found to be $frac{e^y}{(e^y+1)^2}$.
Part b asks for the mean and variance of $y$ but when I tried to find the $E(y)$, I got zero with the integral from $-infty$ to $infty$ of $frac{ye^y}{(e^y+1)^2}$. I'm not sure where I'm going wrong with this problem?
variance mean
New contributor
$endgroup$
add a comment |
$begingroup$
I have a problem on my homework about the continuous random variable $y$ where the cdf is $F(y)=frac{1}{(1+e^{-y})}$.
Part a is asking for the pdf which I found to be $frac{e^y}{(e^y+1)^2}$.
Part b asks for the mean and variance of $y$ but when I tried to find the $E(y)$, I got zero with the integral from $-infty$ to $infty$ of $frac{ye^y}{(e^y+1)^2}$. I'm not sure where I'm going wrong with this problem?
variance mean
New contributor
$endgroup$
I have a problem on my homework about the continuous random variable $y$ where the cdf is $F(y)=frac{1}{(1+e^{-y})}$.
Part a is asking for the pdf which I found to be $frac{e^y}{(e^y+1)^2}$.
Part b asks for the mean and variance of $y$ but when I tried to find the $E(y)$, I got zero with the integral from $-infty$ to $infty$ of $frac{ye^y}{(e^y+1)^2}$. I'm not sure where I'm going wrong with this problem?
variance mean
variance mean
New contributor
New contributor
edited 2 hours ago
Noah
3,6011417
3,6011417
New contributor
asked 5 hours ago
EBuschEBusch
112
112
New contributor
New contributor
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
$begingroup$
What makes you think you did something wrong?
begin{align}
& Pr(Yle y) = F(y) = frac 1 {1+e^{-y}} \[10pt]
text{and } & Pr(Yge -y) = 1-F(-y) = 1- frac 1 {1+e^y} \[8pt]
= {} & frac{e^y}{1+e^y} = frac{e^ycdot e^{-y}}{(1+e^y)cdot e^{-y}} = frac 1 {e^{-y}+1},
end{align}
and therefore
$$
Pr(Yle y) = Pr(Y ge -y).
$$
So this distribution is symmetric about $0.$
Therefore, if the expected value exists, it is $0.$
You can also show that the density function is an even function:
begin{align}
f(y) & = frac{e^y}{(1+e^y)^2}. \[12pt]
f(-y) & = frac{e^{-y}}{(1+e^{-y})^2} = frac{e^{-y}cdotleft( e^y right)^2}{Big((1+e^{-y}) cdot e^y Big)^2} = frac{e^y}{(e^y+1)^2} = f(y).
end{align}
Since the density is an even function, the expected value must be $0$ if it exists.
The expected value $operatorname E(Y)$ exists if $operatorname E(|Y|) < +infty.$
$endgroup$
add a comment |
$begingroup$
Comment:
Setting what I take to be your CDF equal to $U sim mathsf{Unif}(0,1),$ and solving for the quantile function (inverse CDF) in terms of $U,$ I simulate a sample of a million
observations as shown below.
Then, when I plot one possible interpretation of your PDF through the histogram of the large sample, that density function
seems to fit pretty well.
set.seed(1019) # for reproducibility
u = runif(10^6); x = -log(1/u - 1)
hist(x, prob=T, br=100, col="skyblue2")
curve(exp(x)/(exp(x)+1)^2, -10, 10, add=T, lwd=2, col="red")
I don't pretend that this is a 'worked answer' to your problem, but
I hope it may give you enough clues to improve the version of the problem you posted and to finish the problem on your own.
$endgroup$
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: "65"
};
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: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
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
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
EBusch is a new contributor. Be nice, and check out our Code of Conduct.
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%2fstats.stackexchange.com%2fquestions%2f401726%2fmean-and-variance-of-continuous-random-variable%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
What makes you think you did something wrong?
begin{align}
& Pr(Yle y) = F(y) = frac 1 {1+e^{-y}} \[10pt]
text{and } & Pr(Yge -y) = 1-F(-y) = 1- frac 1 {1+e^y} \[8pt]
= {} & frac{e^y}{1+e^y} = frac{e^ycdot e^{-y}}{(1+e^y)cdot e^{-y}} = frac 1 {e^{-y}+1},
end{align}
and therefore
$$
Pr(Yle y) = Pr(Y ge -y).
$$
So this distribution is symmetric about $0.$
Therefore, if the expected value exists, it is $0.$
You can also show that the density function is an even function:
begin{align}
f(y) & = frac{e^y}{(1+e^y)^2}. \[12pt]
f(-y) & = frac{e^{-y}}{(1+e^{-y})^2} = frac{e^{-y}cdotleft( e^y right)^2}{Big((1+e^{-y}) cdot e^y Big)^2} = frac{e^y}{(e^y+1)^2} = f(y).
end{align}
Since the density is an even function, the expected value must be $0$ if it exists.
The expected value $operatorname E(Y)$ exists if $operatorname E(|Y|) < +infty.$
$endgroup$
add a comment |
$begingroup$
What makes you think you did something wrong?
begin{align}
& Pr(Yle y) = F(y) = frac 1 {1+e^{-y}} \[10pt]
text{and } & Pr(Yge -y) = 1-F(-y) = 1- frac 1 {1+e^y} \[8pt]
= {} & frac{e^y}{1+e^y} = frac{e^ycdot e^{-y}}{(1+e^y)cdot e^{-y}} = frac 1 {e^{-y}+1},
end{align}
and therefore
$$
Pr(Yle y) = Pr(Y ge -y).
$$
So this distribution is symmetric about $0.$
Therefore, if the expected value exists, it is $0.$
You can also show that the density function is an even function:
begin{align}
f(y) & = frac{e^y}{(1+e^y)^2}. \[12pt]
f(-y) & = frac{e^{-y}}{(1+e^{-y})^2} = frac{e^{-y}cdotleft( e^y right)^2}{Big((1+e^{-y}) cdot e^y Big)^2} = frac{e^y}{(e^y+1)^2} = f(y).
end{align}
Since the density is an even function, the expected value must be $0$ if it exists.
The expected value $operatorname E(Y)$ exists if $operatorname E(|Y|) < +infty.$
$endgroup$
add a comment |
$begingroup$
What makes you think you did something wrong?
begin{align}
& Pr(Yle y) = F(y) = frac 1 {1+e^{-y}} \[10pt]
text{and } & Pr(Yge -y) = 1-F(-y) = 1- frac 1 {1+e^y} \[8pt]
= {} & frac{e^y}{1+e^y} = frac{e^ycdot e^{-y}}{(1+e^y)cdot e^{-y}} = frac 1 {e^{-y}+1},
end{align}
and therefore
$$
Pr(Yle y) = Pr(Y ge -y).
$$
So this distribution is symmetric about $0.$
Therefore, if the expected value exists, it is $0.$
You can also show that the density function is an even function:
begin{align}
f(y) & = frac{e^y}{(1+e^y)^2}. \[12pt]
f(-y) & = frac{e^{-y}}{(1+e^{-y})^2} = frac{e^{-y}cdotleft( e^y right)^2}{Big((1+e^{-y}) cdot e^y Big)^2} = frac{e^y}{(e^y+1)^2} = f(y).
end{align}
Since the density is an even function, the expected value must be $0$ if it exists.
The expected value $operatorname E(Y)$ exists if $operatorname E(|Y|) < +infty.$
$endgroup$
What makes you think you did something wrong?
begin{align}
& Pr(Yle y) = F(y) = frac 1 {1+e^{-y}} \[10pt]
text{and } & Pr(Yge -y) = 1-F(-y) = 1- frac 1 {1+e^y} \[8pt]
= {} & frac{e^y}{1+e^y} = frac{e^ycdot e^{-y}}{(1+e^y)cdot e^{-y}} = frac 1 {e^{-y}+1},
end{align}
and therefore
$$
Pr(Yle y) = Pr(Y ge -y).
$$
So this distribution is symmetric about $0.$
Therefore, if the expected value exists, it is $0.$
You can also show that the density function is an even function:
begin{align}
f(y) & = frac{e^y}{(1+e^y)^2}. \[12pt]
f(-y) & = frac{e^{-y}}{(1+e^{-y})^2} = frac{e^{-y}cdotleft( e^y right)^2}{Big((1+e^{-y}) cdot e^y Big)^2} = frac{e^y}{(e^y+1)^2} = f(y).
end{align}
Since the density is an even function, the expected value must be $0$ if it exists.
The expected value $operatorname E(Y)$ exists if $operatorname E(|Y|) < +infty.$
answered 2 hours ago
Michael HardyMichael Hardy
3,9951430
3,9951430
add a comment |
add a comment |
$begingroup$
Comment:
Setting what I take to be your CDF equal to $U sim mathsf{Unif}(0,1),$ and solving for the quantile function (inverse CDF) in terms of $U,$ I simulate a sample of a million
observations as shown below.
Then, when I plot one possible interpretation of your PDF through the histogram of the large sample, that density function
seems to fit pretty well.
set.seed(1019) # for reproducibility
u = runif(10^6); x = -log(1/u - 1)
hist(x, prob=T, br=100, col="skyblue2")
curve(exp(x)/(exp(x)+1)^2, -10, 10, add=T, lwd=2, col="red")
I don't pretend that this is a 'worked answer' to your problem, but
I hope it may give you enough clues to improve the version of the problem you posted and to finish the problem on your own.
$endgroup$
add a comment |
$begingroup$
Comment:
Setting what I take to be your CDF equal to $U sim mathsf{Unif}(0,1),$ and solving for the quantile function (inverse CDF) in terms of $U,$ I simulate a sample of a million
observations as shown below.
Then, when I plot one possible interpretation of your PDF through the histogram of the large sample, that density function
seems to fit pretty well.
set.seed(1019) # for reproducibility
u = runif(10^6); x = -log(1/u - 1)
hist(x, prob=T, br=100, col="skyblue2")
curve(exp(x)/(exp(x)+1)^2, -10, 10, add=T, lwd=2, col="red")
I don't pretend that this is a 'worked answer' to your problem, but
I hope it may give you enough clues to improve the version of the problem you posted and to finish the problem on your own.
$endgroup$
add a comment |
$begingroup$
Comment:
Setting what I take to be your CDF equal to $U sim mathsf{Unif}(0,1),$ and solving for the quantile function (inverse CDF) in terms of $U,$ I simulate a sample of a million
observations as shown below.
Then, when I plot one possible interpretation of your PDF through the histogram of the large sample, that density function
seems to fit pretty well.
set.seed(1019) # for reproducibility
u = runif(10^6); x = -log(1/u - 1)
hist(x, prob=T, br=100, col="skyblue2")
curve(exp(x)/(exp(x)+1)^2, -10, 10, add=T, lwd=2, col="red")
I don't pretend that this is a 'worked answer' to your problem, but
I hope it may give you enough clues to improve the version of the problem you posted and to finish the problem on your own.
$endgroup$
Comment:
Setting what I take to be your CDF equal to $U sim mathsf{Unif}(0,1),$ and solving for the quantile function (inverse CDF) in terms of $U,$ I simulate a sample of a million
observations as shown below.
Then, when I plot one possible interpretation of your PDF through the histogram of the large sample, that density function
seems to fit pretty well.
set.seed(1019) # for reproducibility
u = runif(10^6); x = -log(1/u - 1)
hist(x, prob=T, br=100, col="skyblue2")
curve(exp(x)/(exp(x)+1)^2, -10, 10, add=T, lwd=2, col="red")
I don't pretend that this is a 'worked answer' to your problem, but
I hope it may give you enough clues to improve the version of the problem you posted and to finish the problem on your own.
edited 23 mins ago
answered 4 hours ago
BruceETBruceET
6,3531721
6,3531721
add a comment |
add a comment |
EBusch is a new contributor. Be nice, and check out our Code of Conduct.
EBusch is a new contributor. Be nice, and check out our Code of Conduct.
EBusch is a new contributor. Be nice, and check out our Code of Conduct.
EBusch is a new contributor. Be nice, and check out our Code of Conduct.
Thanks for contributing an answer to Cross Validated!
- 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.
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%2fstats.stackexchange.com%2fquestions%2f401726%2fmean-and-variance-of-continuous-random-variable%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