Expectation of a battery lifetime: Uniform Distributions
up vote
0
down vote
favorite
Question:
A battery has a lifetime of $24$ hours and it is used for maximum three days. On each day, a person uses the battery for $K$ hours, where $K$ is uniform on $[0,24]$ and independent of the other days. What is the expectation of the remaining lifetime at the end of the third day?
My work:
Let $X$, $Y$, $Z$ as the amount of battery lifetime used on each day, respectively. Then the amount of battery lifetime left at the third day would be as follows:
$W=$ $[(24-X)/24]$ * $[(24-X-Y)/24]$ * $(24-X-Y-Z)$
Since at the second day, for a probability of $X/24$, the remaining lifetime would be $0$, and else (for a probability of $(24-X)/24$), there would be $(24-X-Y)$ left. I did the same for the third day.
Then I computed $E[W]$, which seemed to be $4$, but the correct answer seems to be $1$ (hour).
I think $W$ is miscalculated, because I checked the rest a couple times. Can anyone tell me what is wrong?
(Edit) If it is simplified into a two-day process, I thought it can be calculated as the following:
Let $W$ the amount of lifetime left at the end of the second day. If $X$ is used on the first day, there is a $(X/24)$ probability that the battery will be used up on the second day. On the other hand, $((24-X)/24)$ is the probability that the used amount of the battery is $(X+Y)$, or $(24-X-Y)$ is the left amount.
Then $W=(X/24)*0+((24-X)/24)*(24-X-Y)$
and
$E[W]= (1/24) * E[(24-X)(24-X-Y)]= (1/24)*(24^2 - 48E[X] - 24E[Y] + E[X^2] + E[XY])$
where
$E[X]=E[Y], E[X^2]=E[XY]$ since $X$ and $Y$ are independent, and $E[X]=12, E[X^2]=192$.
Then we have:
$E[W]=24-2*12-12+16=4$ (hours),
which is the same as the calculation obtained by the integration method.
probability uniform-distribution expected-value
add a comment |
up vote
0
down vote
favorite
Question:
A battery has a lifetime of $24$ hours and it is used for maximum three days. On each day, a person uses the battery for $K$ hours, where $K$ is uniform on $[0,24]$ and independent of the other days. What is the expectation of the remaining lifetime at the end of the third day?
My work:
Let $X$, $Y$, $Z$ as the amount of battery lifetime used on each day, respectively. Then the amount of battery lifetime left at the third day would be as follows:
$W=$ $[(24-X)/24]$ * $[(24-X-Y)/24]$ * $(24-X-Y-Z)$
Since at the second day, for a probability of $X/24$, the remaining lifetime would be $0$, and else (for a probability of $(24-X)/24$), there would be $(24-X-Y)$ left. I did the same for the third day.
Then I computed $E[W]$, which seemed to be $4$, but the correct answer seems to be $1$ (hour).
I think $W$ is miscalculated, because I checked the rest a couple times. Can anyone tell me what is wrong?
(Edit) If it is simplified into a two-day process, I thought it can be calculated as the following:
Let $W$ the amount of lifetime left at the end of the second day. If $X$ is used on the first day, there is a $(X/24)$ probability that the battery will be used up on the second day. On the other hand, $((24-X)/24)$ is the probability that the used amount of the battery is $(X+Y)$, or $(24-X-Y)$ is the left amount.
Then $W=(X/24)*0+((24-X)/24)*(24-X-Y)$
and
$E[W]= (1/24) * E[(24-X)(24-X-Y)]= (1/24)*(24^2 - 48E[X] - 24E[Y] + E[X^2] + E[XY])$
where
$E[X]=E[Y], E[X^2]=E[XY]$ since $X$ and $Y$ are independent, and $E[X]=12, E[X^2]=192$.
Then we have:
$E[W]=24-2*12-12+16=4$ (hours),
which is the same as the calculation obtained by the integration method.
probability uniform-distribution expected-value
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
Question:
A battery has a lifetime of $24$ hours and it is used for maximum three days. On each day, a person uses the battery for $K$ hours, where $K$ is uniform on $[0,24]$ and independent of the other days. What is the expectation of the remaining lifetime at the end of the third day?
My work:
Let $X$, $Y$, $Z$ as the amount of battery lifetime used on each day, respectively. Then the amount of battery lifetime left at the third day would be as follows:
$W=$ $[(24-X)/24]$ * $[(24-X-Y)/24]$ * $(24-X-Y-Z)$
Since at the second day, for a probability of $X/24$, the remaining lifetime would be $0$, and else (for a probability of $(24-X)/24$), there would be $(24-X-Y)$ left. I did the same for the third day.
Then I computed $E[W]$, which seemed to be $4$, but the correct answer seems to be $1$ (hour).
I think $W$ is miscalculated, because I checked the rest a couple times. Can anyone tell me what is wrong?
(Edit) If it is simplified into a two-day process, I thought it can be calculated as the following:
Let $W$ the amount of lifetime left at the end of the second day. If $X$ is used on the first day, there is a $(X/24)$ probability that the battery will be used up on the second day. On the other hand, $((24-X)/24)$ is the probability that the used amount of the battery is $(X+Y)$, or $(24-X-Y)$ is the left amount.
Then $W=(X/24)*0+((24-X)/24)*(24-X-Y)$
and
$E[W]= (1/24) * E[(24-X)(24-X-Y)]= (1/24)*(24^2 - 48E[X] - 24E[Y] + E[X^2] + E[XY])$
where
$E[X]=E[Y], E[X^2]=E[XY]$ since $X$ and $Y$ are independent, and $E[X]=12, E[X^2]=192$.
Then we have:
$E[W]=24-2*12-12+16=4$ (hours),
which is the same as the calculation obtained by the integration method.
probability uniform-distribution expected-value
Question:
A battery has a lifetime of $24$ hours and it is used for maximum three days. On each day, a person uses the battery for $K$ hours, where $K$ is uniform on $[0,24]$ and independent of the other days. What is the expectation of the remaining lifetime at the end of the third day?
My work:
Let $X$, $Y$, $Z$ as the amount of battery lifetime used on each day, respectively. Then the amount of battery lifetime left at the third day would be as follows:
$W=$ $[(24-X)/24]$ * $[(24-X-Y)/24]$ * $(24-X-Y-Z)$
Since at the second day, for a probability of $X/24$, the remaining lifetime would be $0$, and else (for a probability of $(24-X)/24$), there would be $(24-X-Y)$ left. I did the same for the third day.
Then I computed $E[W]$, which seemed to be $4$, but the correct answer seems to be $1$ (hour).
I think $W$ is miscalculated, because I checked the rest a couple times. Can anyone tell me what is wrong?
(Edit) If it is simplified into a two-day process, I thought it can be calculated as the following:
Let $W$ the amount of lifetime left at the end of the second day. If $X$ is used on the first day, there is a $(X/24)$ probability that the battery will be used up on the second day. On the other hand, $((24-X)/24)$ is the probability that the used amount of the battery is $(X+Y)$, or $(24-X-Y)$ is the left amount.
Then $W=(X/24)*0+((24-X)/24)*(24-X-Y)$
and
$E[W]= (1/24) * E[(24-X)(24-X-Y)]= (1/24)*(24^2 - 48E[X] - 24E[Y] + E[X^2] + E[XY])$
where
$E[X]=E[Y], E[X^2]=E[XY]$ since $X$ and $Y$ are independent, and $E[X]=12, E[X^2]=192$.
Then we have:
$E[W]=24-2*12-12+16=4$ (hours),
which is the same as the calculation obtained by the integration method.
probability uniform-distribution expected-value
probability uniform-distribution expected-value
edited 20 hours ago
asked 22 hours ago
Richard
376
376
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
up vote
1
down vote
accepted
Don't you just want to integrate $24-x-y-z$ over the region where this is positive? That is, $${1over24^3}int_0^{24}int_0^{24-x}int_0^{24-x-y}(24-x-y-z)dzdydx$$
Got it! Thanks for a straightforward answer. But can you tell which part I missed at my original solution?
– Richard
21 hours ago
And, can you please explain why you divided by $1/(24^3)$?
– Richard
21 hours ago
1
@Richard Well, to get a uniform probability distribution over $[0,24]$, I have to divide by $24,$ so for a triple integral, I divide by $24^3$. For the average use in a day, for example, we'd compute ${1over24}int_0^{24}xdx=12.$
– saulspatz
21 hours ago
Gosh, I suddenly forgot the distribution was uniform... Thanks!
– Richard
20 hours ago
@Richard All I can say about what's wrong is that you seem to be trying to accomplish by multiplication what you need to do by adjusting the limits of integration. Maybe I just don't understand what you're doing, but it simply looks wrong to me. On second thought, maybe you're thinking about the probability that the battery isn't used up, but that's not how to compute the expectation.
– saulspatz
20 hours ago
|
show 3 more comments
up vote
0
down vote
Just an addendum to saulspatz's answer, in which for convenience I'll change time units to days so every $24$ becomes a $1$: if the battery is used for uniformly distributed time periods on each of $n$ days, the fraction of its lifetime remaining is $frac{1}{(n+1)!}$, which in the $n=3$ case considered herein becomes $frac{1}{24}$, i.e. an hour as required. But where did I get this formula from?
We wish to evaluate $int_{P_n}(1-sum_{i=1}^n x_i)d^n x$, where $P_n$ is the region $x_ige 0,,sum_i x_ile 1$. With the substitution $x_i=sin^2 t_icdot prod_{j<i}cos^2 t_j$, the Jacobian is $2^nprod_i sin t_i cos^{2n+1-2i}t_i$, and $1-sum_i x_i=prod_icos^2t_i$. The integral becomes $$2^nprod_iint_0^{pi/2}sinthetacos^{2n+3-2i}theta dtheta=2^nprod_ifrac{1}{2n+4-2i}=prod_ifrac{1}{n+2-i}=frac{1}{(n+1)!}.$$
add a comment |
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
accepted
Don't you just want to integrate $24-x-y-z$ over the region where this is positive? That is, $${1over24^3}int_0^{24}int_0^{24-x}int_0^{24-x-y}(24-x-y-z)dzdydx$$
Got it! Thanks for a straightforward answer. But can you tell which part I missed at my original solution?
– Richard
21 hours ago
And, can you please explain why you divided by $1/(24^3)$?
– Richard
21 hours ago
1
@Richard Well, to get a uniform probability distribution over $[0,24]$, I have to divide by $24,$ so for a triple integral, I divide by $24^3$. For the average use in a day, for example, we'd compute ${1over24}int_0^{24}xdx=12.$
– saulspatz
21 hours ago
Gosh, I suddenly forgot the distribution was uniform... Thanks!
– Richard
20 hours ago
@Richard All I can say about what's wrong is that you seem to be trying to accomplish by multiplication what you need to do by adjusting the limits of integration. Maybe I just don't understand what you're doing, but it simply looks wrong to me. On second thought, maybe you're thinking about the probability that the battery isn't used up, but that's not how to compute the expectation.
– saulspatz
20 hours ago
|
show 3 more comments
up vote
1
down vote
accepted
Don't you just want to integrate $24-x-y-z$ over the region where this is positive? That is, $${1over24^3}int_0^{24}int_0^{24-x}int_0^{24-x-y}(24-x-y-z)dzdydx$$
Got it! Thanks for a straightforward answer. But can you tell which part I missed at my original solution?
– Richard
21 hours ago
And, can you please explain why you divided by $1/(24^3)$?
– Richard
21 hours ago
1
@Richard Well, to get a uniform probability distribution over $[0,24]$, I have to divide by $24,$ so for a triple integral, I divide by $24^3$. For the average use in a day, for example, we'd compute ${1over24}int_0^{24}xdx=12.$
– saulspatz
21 hours ago
Gosh, I suddenly forgot the distribution was uniform... Thanks!
– Richard
20 hours ago
@Richard All I can say about what's wrong is that you seem to be trying to accomplish by multiplication what you need to do by adjusting the limits of integration. Maybe I just don't understand what you're doing, but it simply looks wrong to me. On second thought, maybe you're thinking about the probability that the battery isn't used up, but that's not how to compute the expectation.
– saulspatz
20 hours ago
|
show 3 more comments
up vote
1
down vote
accepted
up vote
1
down vote
accepted
Don't you just want to integrate $24-x-y-z$ over the region where this is positive? That is, $${1over24^3}int_0^{24}int_0^{24-x}int_0^{24-x-y}(24-x-y-z)dzdydx$$
Don't you just want to integrate $24-x-y-z$ over the region where this is positive? That is, $${1over24^3}int_0^{24}int_0^{24-x}int_0^{24-x-y}(24-x-y-z)dzdydx$$
answered 21 hours ago
saulspatz
12.8k21327
12.8k21327
Got it! Thanks for a straightforward answer. But can you tell which part I missed at my original solution?
– Richard
21 hours ago
And, can you please explain why you divided by $1/(24^3)$?
– Richard
21 hours ago
1
@Richard Well, to get a uniform probability distribution over $[0,24]$, I have to divide by $24,$ so for a triple integral, I divide by $24^3$. For the average use in a day, for example, we'd compute ${1over24}int_0^{24}xdx=12.$
– saulspatz
21 hours ago
Gosh, I suddenly forgot the distribution was uniform... Thanks!
– Richard
20 hours ago
@Richard All I can say about what's wrong is that you seem to be trying to accomplish by multiplication what you need to do by adjusting the limits of integration. Maybe I just don't understand what you're doing, but it simply looks wrong to me. On second thought, maybe you're thinking about the probability that the battery isn't used up, but that's not how to compute the expectation.
– saulspatz
20 hours ago
|
show 3 more comments
Got it! Thanks for a straightforward answer. But can you tell which part I missed at my original solution?
– Richard
21 hours ago
And, can you please explain why you divided by $1/(24^3)$?
– Richard
21 hours ago
1
@Richard Well, to get a uniform probability distribution over $[0,24]$, I have to divide by $24,$ so for a triple integral, I divide by $24^3$. For the average use in a day, for example, we'd compute ${1over24}int_0^{24}xdx=12.$
– saulspatz
21 hours ago
Gosh, I suddenly forgot the distribution was uniform... Thanks!
– Richard
20 hours ago
@Richard All I can say about what's wrong is that you seem to be trying to accomplish by multiplication what you need to do by adjusting the limits of integration. Maybe I just don't understand what you're doing, but it simply looks wrong to me. On second thought, maybe you're thinking about the probability that the battery isn't used up, but that's not how to compute the expectation.
– saulspatz
20 hours ago
Got it! Thanks for a straightforward answer. But can you tell which part I missed at my original solution?
– Richard
21 hours ago
Got it! Thanks for a straightforward answer. But can you tell which part I missed at my original solution?
– Richard
21 hours ago
And, can you please explain why you divided by $1/(24^3)$?
– Richard
21 hours ago
And, can you please explain why you divided by $1/(24^3)$?
– Richard
21 hours ago
1
1
@Richard Well, to get a uniform probability distribution over $[0,24]$, I have to divide by $24,$ so for a triple integral, I divide by $24^3$. For the average use in a day, for example, we'd compute ${1over24}int_0^{24}xdx=12.$
– saulspatz
21 hours ago
@Richard Well, to get a uniform probability distribution over $[0,24]$, I have to divide by $24,$ so for a triple integral, I divide by $24^3$. For the average use in a day, for example, we'd compute ${1over24}int_0^{24}xdx=12.$
– saulspatz
21 hours ago
Gosh, I suddenly forgot the distribution was uniform... Thanks!
– Richard
20 hours ago
Gosh, I suddenly forgot the distribution was uniform... Thanks!
– Richard
20 hours ago
@Richard All I can say about what's wrong is that you seem to be trying to accomplish by multiplication what you need to do by adjusting the limits of integration. Maybe I just don't understand what you're doing, but it simply looks wrong to me. On second thought, maybe you're thinking about the probability that the battery isn't used up, but that's not how to compute the expectation.
– saulspatz
20 hours ago
@Richard All I can say about what's wrong is that you seem to be trying to accomplish by multiplication what you need to do by adjusting the limits of integration. Maybe I just don't understand what you're doing, but it simply looks wrong to me. On second thought, maybe you're thinking about the probability that the battery isn't used up, but that's not how to compute the expectation.
– saulspatz
20 hours ago
|
show 3 more comments
up vote
0
down vote
Just an addendum to saulspatz's answer, in which for convenience I'll change time units to days so every $24$ becomes a $1$: if the battery is used for uniformly distributed time periods on each of $n$ days, the fraction of its lifetime remaining is $frac{1}{(n+1)!}$, which in the $n=3$ case considered herein becomes $frac{1}{24}$, i.e. an hour as required. But where did I get this formula from?
We wish to evaluate $int_{P_n}(1-sum_{i=1}^n x_i)d^n x$, where $P_n$ is the region $x_ige 0,,sum_i x_ile 1$. With the substitution $x_i=sin^2 t_icdot prod_{j<i}cos^2 t_j$, the Jacobian is $2^nprod_i sin t_i cos^{2n+1-2i}t_i$, and $1-sum_i x_i=prod_icos^2t_i$. The integral becomes $$2^nprod_iint_0^{pi/2}sinthetacos^{2n+3-2i}theta dtheta=2^nprod_ifrac{1}{2n+4-2i}=prod_ifrac{1}{n+2-i}=frac{1}{(n+1)!}.$$
add a comment |
up vote
0
down vote
Just an addendum to saulspatz's answer, in which for convenience I'll change time units to days so every $24$ becomes a $1$: if the battery is used for uniformly distributed time periods on each of $n$ days, the fraction of its lifetime remaining is $frac{1}{(n+1)!}$, which in the $n=3$ case considered herein becomes $frac{1}{24}$, i.e. an hour as required. But where did I get this formula from?
We wish to evaluate $int_{P_n}(1-sum_{i=1}^n x_i)d^n x$, where $P_n$ is the region $x_ige 0,,sum_i x_ile 1$. With the substitution $x_i=sin^2 t_icdot prod_{j<i}cos^2 t_j$, the Jacobian is $2^nprod_i sin t_i cos^{2n+1-2i}t_i$, and $1-sum_i x_i=prod_icos^2t_i$. The integral becomes $$2^nprod_iint_0^{pi/2}sinthetacos^{2n+3-2i}theta dtheta=2^nprod_ifrac{1}{2n+4-2i}=prod_ifrac{1}{n+2-i}=frac{1}{(n+1)!}.$$
add a comment |
up vote
0
down vote
up vote
0
down vote
Just an addendum to saulspatz's answer, in which for convenience I'll change time units to days so every $24$ becomes a $1$: if the battery is used for uniformly distributed time periods on each of $n$ days, the fraction of its lifetime remaining is $frac{1}{(n+1)!}$, which in the $n=3$ case considered herein becomes $frac{1}{24}$, i.e. an hour as required. But where did I get this formula from?
We wish to evaluate $int_{P_n}(1-sum_{i=1}^n x_i)d^n x$, where $P_n$ is the region $x_ige 0,,sum_i x_ile 1$. With the substitution $x_i=sin^2 t_icdot prod_{j<i}cos^2 t_j$, the Jacobian is $2^nprod_i sin t_i cos^{2n+1-2i}t_i$, and $1-sum_i x_i=prod_icos^2t_i$. The integral becomes $$2^nprod_iint_0^{pi/2}sinthetacos^{2n+3-2i}theta dtheta=2^nprod_ifrac{1}{2n+4-2i}=prod_ifrac{1}{n+2-i}=frac{1}{(n+1)!}.$$
Just an addendum to saulspatz's answer, in which for convenience I'll change time units to days so every $24$ becomes a $1$: if the battery is used for uniformly distributed time periods on each of $n$ days, the fraction of its lifetime remaining is $frac{1}{(n+1)!}$, which in the $n=3$ case considered herein becomes $frac{1}{24}$, i.e. an hour as required. But where did I get this formula from?
We wish to evaluate $int_{P_n}(1-sum_{i=1}^n x_i)d^n x$, where $P_n$ is the region $x_ige 0,,sum_i x_ile 1$. With the substitution $x_i=sin^2 t_icdot prod_{j<i}cos^2 t_j$, the Jacobian is $2^nprod_i sin t_i cos^{2n+1-2i}t_i$, and $1-sum_i x_i=prod_icos^2t_i$. The integral becomes $$2^nprod_iint_0^{pi/2}sinthetacos^{2n+3-2i}theta dtheta=2^nprod_ifrac{1}{2n+4-2i}=prod_ifrac{1}{n+2-i}=frac{1}{(n+1)!}.$$
answered 19 hours ago
J.G.
18.1k11830
18.1k11830
add a comment |
add a comment |
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%2f3004842%2fexpectation-of-a-battery-lifetime-uniform-distributions%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