# Calculate the expected value for filling up a cup

In summary, if you pour a volume of x into an empty cup with a total volume of a, then the total volume in the cup is Y(x).
Homework Statement
Into a cup with volume 'a' you pour volume X.
X has density function
$$fx(x) = (x+1)^{-2}, x \geq 0$$
Y = volume in the cup after you've poured in X.
Calculate E(Y)
Note: if x > a then the cup flows over.
Relevant Equations
$$E(Y) = \int g(x) * fx(x) dx, Y = g(x)$$
My guess is that g(x) = x?
The limits of integration should be 0 to a, since after a the cup flows over.

If I put these in, I get the solution (I've doubled checked with wolfram alpha that it's correct):
$$E(Y) = ln(a+1) + 1/(a+1) - 1$$

The textbook solution is just ln(a+1).
I'm super new to the whole concept of probability so I'm just trying to make qualified guesses at what all the variables mean, obviously I did something wrong but what?

So, we start with a cup with volume ##a## and then we add volume ##X## to the cup. We end up with a volume of ##a+X##, so we get ##Y = a + X##. Thus ##Y = g(X)## where ##g(x) = a+x##.

Now, $$\mathbb{E}(Y) = \int g(x) f_X(x) dx = \int (a+x) (x+1)^{-2}dx$$ should give the right answer.

Math_QED said:
So, we start with a cup with volume ##a## and then we add volume ##X## to the cup. We end up with a volume of ##a+X##, so we get ##Y = a + X##. Thus ##Y = g(X)## where ##g(x) = a+x##.

Now, $$\mathbb{E}(Y) = \int g(x) f_X(x) dx = \int (a+x) (x+1)^{-2}dx$$ should give the right answer.
I think the cup is empty, the actual volume of the cup is a. Cause it says: if x > a then the cup runs over)

I think the cup is empty, the actual volume of the cup is a. Cause it says: if x > a then the cup runs over)

Ok, maybe post the entire problem statement next time? I misinterpreted: Here is what you do:

You start pouring a volume ##X## into an empty cup with total volume ##a##. Thus the total volume in the cup is $$Y(\omega):= \begin{cases}X(\omega) \quad X(\omega) \leq a \\ a \quad X(\omega) \geq a\end{cases}$$
Thus ##Y= g(X)## where
$$g(x) = \begin{cases}x \quad x \leq a \\ a \quad x \geq a\end{cases}$$
Hence,
$$\mathbb{E}(Y) = \int_0^\infty g(x) f_X(x) dx = \int_0^a x (x+1)^{-2}dx + a\int_a^\infty (x+1)^{-2}dx$$

Does this give you the correct result? (Wolfram alpha gives ##\ln(a+1)## as a result for this calculation, which corresponds to your textbook answer).

Haha I'm sorry, I read it and thought it was a very unnessecary detail to add, obviously I was wrong :p
Yes, if I integrate from a to inf, with the condition that g(x)=a, it balance out and I get correct answer. Thanks!

## 1. What is the expected value for filling up a cup?

The expected value for filling up a cup is the average amount of liquid that will be in the cup after each fill. This can be calculated by multiplying the volume of the cup by the probability of filling the cup with that amount of liquid.

## 2. How do you calculate the expected value for filling up a cup?

To calculate the expected value for filling up a cup, you will need to know the volume of the cup and the probability of filling the cup with that amount of liquid. Multiply the volume by the probability to get the expected value.

## 3. Can the expected value for filling up a cup change?

Yes, the expected value for filling up a cup can change depending on factors such as the size of the cup and the probability of filling it with a certain amount of liquid. It is important to recalculate the expected value if these factors change.

## 4. What is the significance of calculating the expected value for filling up a cup?

Calculating the expected value for filling up a cup can help determine the most likely amount of liquid that will be in the cup after each fill. This can be useful in planning and predicting outcomes in various situations, such as filling a cup with a certain amount of medication.

## 5. Are there any limitations to calculating the expected value for filling up a cup?

Yes, there are limitations to calculating the expected value for filling up a cup. This method assumes that the probability of filling the cup with a certain amount of liquid is constant and does not take into account any external factors that may affect the outcome.

• Calculus and Beyond Homework Help
Replies
13
Views
11K
• Calculus and Beyond Homework Help
Replies
5
Views
1K
• Calculus and Beyond Homework Help
Replies
10
Views
2K
• Calculus and Beyond Homework Help
Replies
6
Views
2K
• Calculus and Beyond Homework Help
Replies
2
Views
1K
• Calculus and Beyond Homework Help
Replies
2
Views
2K
• Precalculus Mathematics Homework Help
Replies
9
Views
878
• Calculus and Beyond Homework Help
Replies
3
Views
1K
• Calculus and Beyond Homework Help
Replies
4
Views
1K
• Precalculus Mathematics Homework Help
Replies
7
Views
861