Probability density function

KataKoniK

How do I calculate the PDF of someone's earning followed by their mean and variance?

This is the question:

Given density function

f(x) = 2.5 if 0.1 < x < 0.5
0 otherwise

The person is paid by the # of jobs they finish rather than by the hour. They get 10$/job. Calculate the density function of his earnings per hour, then their mean and variance. What I did so far was integrating 2.5 from 0.2 to 0.4 and got an answer of 0.5. I am a bit confused on what to do with my answer and the 10$/job property. Any help would be great thanks.

Related Introductory Physics Homework Help News on Phys.org

Andrew Mason

Homework Helper
KataKoniK said:
How do I calculate the PDF of someone's earning followed by their mean and variance?

This is the question:

Given density function

f(x) = 2.5 if 0.1 < x < 0.5
0 otherwise

The person is paid by the # of jobs they finish rather than by the hour. They get 10$/job. Calculate the density function of his earnings per hour, then their mean and variance. What I did so far was integrating 2.5 from 0.2 to 0.4 and got an answer of 0.5. I am a bit confused on what to do with my answer and the 10$/job property. Any help would be great thanks.
I think we need more information. What does f(x) represent? What does x represent?

AM

KataKoniK

My mistake. f(x) is the density function where x is the random variable that is dependent on the complexity of the job (x is the time(hr) to finish each job for a guy working for the bank) We need to find out from that, the rate (normally assumed per hour) of working at the bank.

Last edited:

KataKoniK

Not enough information still?

OlderDan

Homework Helper
KataKoniK said:
My mistake. f(x) is the density function where x is the random variable that is dependent on the complexity of the job (x is the time(hr) to finish each job for a guy working for the bank) We need to find out from that, the rate (normally assumed per hour) of working at the bank.
You are given a uniform distribution for the time to complete a task, and you need to find the distribution of the hourly rate of pay. The hourly rate is inversely proportional to the time. You need to do a change of variables from x to u = 1/x and find the new distribution. The general criteria for such a transformation is

$$\left| {f(x)dx} \right| = \left| {g(u)du} \right|$$

so that when the variable transformation and change of limits of integration are accomplished you will have

$$1 = \int_{.1}^{.5} {f(x)dx} = \int_a^b {g(u)du}$$

If you find the mean and standard deviation of the new distribution, you can find the average hourly rate and its standard deviation.

KataKoniK

Hmm, so you are saying that our answer will be 1/[something]? Also, do we integrate from 0.2 to 0.4 because it is 0.1 < x < 0.5 and not 0.1 <= x <= 0.5?

OlderDan

Homework Helper
KataKoniK said:
Hmm, so you are saying that our answer will be 1/[something]? Also, do we integrate from 0.2 to 0.4 because it is 0.1 < x < 0.5 and not 0.1 <= x <= 0.5?
The limits of integration come from u = 1/x and the relationship between du and dx. The limits are not .2 and .4. They are related to the limiting values of 1/x at x = .1 and x = .5. There will be a reversal of limits because du and dx have opposite signs.

I really don't see why you are doing anything with x = .2 and x = .4. You can get arbitrarily close to 0.1 and 0.5. Whether you have 0.1 < x < 0.5 or 0.1 <= x <= 0.5 has no bearing on the result. The integral of the density function is the same regardless of wether the interval is open or closed.

KataKoniK

Alright, I am seriously confused about what you are trying to say here. After thinking this over and reading your replies again, here is what I did so far. Is this what you mean?

I let u = 1/x and then proceeded with du = -1/x^2 dx where

x = 0.1 -> u = 10
x = 0.5 -> u = 2

Then I tried to integrate from 10 to 2, but am really confused about what to do from here. The reason is because the x^2 in -x^2 du = dx does not cancel with anything from the constant value of 2.5.

OlderDan

Homework Helper
That is a good start. What you have so far is

$$1 = \int_{0.1}^{0.5} {f(x)dx} = - \int_{10}^2 {\frac{{f(x)}}{{u^2 }}du} = \int_2^{10} {\frac{{f(x)}}{{u^2 }}du}$$

where

$$f(x) = \frac{1}{{0.4}} = 2.5$$

Convince yourself that the last integral is equal to 1 and you will conclude that the integrand of that integral

$$\frac{{f(x)}}{{u^2 }}$$

is the probability density function of u. The pay per hour is proportional to u. Find the average of u in the usual way you find the average of a variable when you know the probability density function, and you will be able to determine the average hourly pay rate. Do the same for the standard deviation.

KataKoniK

So, if I am reading your post correctly,

$$\frac{{2.5}}{{1/x^2 }}$$

is the Probability density function of u.

And to get the guy's earning per hour, we integrate this

$$\int_2^{10} {\frac{2.5}{{1/x^2 }}dx}$$

which gives us a value, just say 5

Correct? If not, I am still confused on what to do after that here. I am not understanding the proportionality thing and the interpretation of the method of integration for this kind of question. Any clarification would be great thanks.

OlderDan

Homework Helper
KataKoniK said:
So, if I am reading your post correctly,

$$\frac{{2.5}}{{1/x^2 }}$$

is the Probability density function of u.

And to get the guy's earning per hour, we integrate this

$$\int_2^{10} {\frac{2.5}{{1/x^2 }}dx}$$

which gives us a value, just say 5

Correct? If not, I am still confused on what to do after that here. I am not understanding the proportionality thing and the interpretation of the method of integration for this kind of question. Any clarification would be great thanks.
The integral is not correct. The integral should be

$$\int_2^{10} {\frac{2.5}{1/x^2 }d \left(\frac{1}{x} \right) = \int_2^{10} {g(u) du} = \int_2^{10} {\frac{2.5}{u^2} du} = 1$$

where g(u) is the probability density function of u, as you have identified, but this is not the integral for finding the hourly rate. This is just the integral of the probability density function which must always be one for any such function.

Let's review (I assume you have seen this before) the calculation of the mean of a variable when you know its probability distributaion function. For the variable x, the distributuion function is constant between 0.1 and 0.5 and zero everywhere else. By symmetry you can see that the mean is halfway between the end points of the distribution function, or $$\mu = 0.3$$. To actually compute the mean, you need to find the "expected value" of x. That is accomplished by performing the integral of the probability density function times x

$$\mu = E(x) = \int_{0.1}^{0.5} {xf(x)dx}$$

Have you seen this before? You should do this integral and verify that it gives the correct result. The mean of u = 1/x cannot be easily deduced from g(u) because it has no symmetry, but it can be calulated by integrating ug(u)

$$E(u) = \int_2^{10} {ug(u) du}$$

Performing this integral will give you the mean value of u. From your problem statement what is the variable u? x is the time to complete a job measured in hours, so u = 1/x is the number of jobs that are completed each hour. The average number of jobs completed each hour is E(u), so what is the average pay rate? See what you get and check back.

The standard deviation is found by computing another integral, which is usually "simplified" to a couple of integrals that must be combined to get the result. Have you seen these before? See if you can find the formula for calculating the standard deviation from the distribution.

KataKoniK

Thanks for the thorough reply, so is this basically what you mean?

So answering the question
Calculate the density function of his earnings per hour, then their mean and variance.
$$\int_2^{10} {\frac{2.5}{u^2} du} = 1$$

Is the probability density function for the number of jobs completed in each hour. Really dumb question I am not seeing, but is this also the density function for a person's earning per hour? If so, then the first part of the question is done.

Then I must find the mean, which is basically (as you stated)
$$E(u) = \int_2^{10} {ug(u) du}$$

whatever the above gives us (a value, just say 100)

And to find the variance, we just do this

$$VAR(u) =\int_2^{10}{(u - \mu)^2g(u)du}$$

whatever the above gives us is the variance (a value, just say 10).

Correct? I was confused at first. I thought that when the question was asking "What is the probability density function of his earning per hour". I thought they wanted a physical value rather than an equation/integral definition of the scenario.

Last edited:

OlderDan

Homework Helper
They do want an actual value. The integral is not the density function. The density function is g(u). The integral of g(u) over the interval 2 to 10 has to be 1. (The interval from 2 to 10 is the only interval where g(u) is not zero since f(x) is non-zero only between 0.1 and 0.5.) The integral of all probability density functions over their entire range must always be 1. When you perform the integral of ug(u) discussed earlier, you will get a numerical result between 2 and 10. That is the average number of jobs that can be completed in 1 hour. From that number you can calculate the average  earned in one hour. The density function for the pay rate is also g(u) because the pay rate is directly proportional to u. The expected value of the pay rate is not simply ug(u) because the pay rate is a multiple of u, not u itself.

Your expression for the variance is correct. You might want to expand the quadratic and perform separate integrals over the terms in the expansion, but if you can do the integral as written, that is fine too. Performing the integration will also result in a numerical value for the variance of u. If you multiply that by the same factor used for the mean, you will have the variance for the pay rate.

KataKoniK

So you are saying that doing

$$\int_2^{10} {ug(u) du = \int_2^{10} {u \frac{2.5}{u^2} du} = \int_2^{10} {\frac{2.5}{u} du} = 5$$

Assume the answer is 5, so that is the average number of jobs that can be completed in 1 hour? Furthermore, since the answer is 5, his earnings per hour based on that density function is just $50 (5 x 10)? If so, thanks a ton for the help OlderDan. I think I understand it now Your expression for the variance is correct. You might want to expand the quadratic and perform separate integrals over the terms in the expansion, but if you can do the integral as written, that is fine too. Performing the integration will also result in a numerical value for the variance of u. If you multiply that by the same factor used for the mean, you will have the variance for the pay rate. Thanks for the heads up. OlderDan Science Advisor Homework Helper KataKoniK said: So you are saying that doing $$\int_2^{10} {ug(u) du = \int_2^{10} {u \frac{2.5}{u^2} du} = \int_2^{10} {\frac{2.5}{u} du} = 5$$ Assume the answer is 5, so that is the average number of jobs that can be completed in 1 hour? Furthermore, since the answer is 5, his earnings per hour based on that density function is just$50 (5 x 10)? If so, thanks a ton for the help OlderDan. I think I understand it now

Thanks for the heads up.
That's it. Just do the integral and get the right number for E(u)

KataKoniK

Thanks. One last comment, from this, the mean is the same as the average number of jobs completed in 1 hour?

KataKoniK

Ignore the previous post. Is this correct?

$$\int_2^{10} {ug(u) du = \int_2^{10} {u \frac{2.5}{u^2} du} = \int_2^{10} {\frac{2.5}{u} du} = 2.5 ln |u|$$

which gives 2.5 * ln 10 - 2.5 * ln 2 = 4.0236

Earnings per hour is 4.0236 * 10 = 40.236

$$E(u) = 4.0236$$

$$VAR(u) =\int_2^{10}{(u - \mu)^2 (2.5/u^2)du} = 3.810$$

Cool? If so, thanks a bunch for your time and help Furthermore, I just noticed there is a subquestion. It says that the guy has to pay 29% of his earnings for tax purposes. What is the density function of his actual earnings after paying this tax?

Isn't the answer for this just taking (provided I have did the above right) 40.236 / 1.27 = $31.681? Or is the actual density function completely different than what you came up with without the tax? Last edited: OlderDan Science Advisor Homework Helper KataKoniK said: Ignore the previous post. Is this correct? $$\int_2^{10} {ug(u) du = \int_2^{10} {u \frac{2.5}{u^2} du} = \int_2^{10} {\frac{2.5}{u} du} = 2.5 ln |u|$$ which gives 2.5 * ln 10 - 2.5 * ln 2 = 4.0236 Earnings per hour is 4.0236 * 10 = 40.236 $$E(u) = 4.0236$$ $$VAR(u) =\int_2^{10}{(u - \mu)^2 (2.5/u^2)du} = 3.810$$ Cool? If so, thanks a bunch for your time and help Furthermore, I just noticed there is a subquestion. It says that the guy has to pay 29% of his earnings for tax purposes. What is the density function of his actual earnings after paying this tax? Isn't the answer for this just taking (provided I have did the above right) 40.236 / 1.27 =$31.681? Or is the actual density function completely different than what you came up with without the tax?
The hourly rate and variance looks good. The tax does not change the density function. It only changes the scale factor for computing his earnings after taxes. His hourly eanings are still based on the average number of jobs he can complete every hour, for which the density function is the same g(u) as before. You need to check the after taxes calculation.

Last edited:

Thanks a bunch!

OlderDan

Homework Helper
KataKoniK said:
Thanks a bunch!
Look again at your after tax calculation. The number is not correct.

Will do :)

KataKoniK

OlderDan said:
The hourly rate and variance looks good. The tax does not change the density function. It only changes the scale factor for computing his earnings after taxes. His hourly eanings are still based on the average number of jobs he can complete every hour, for which the density function is the same g(u) as before. You need to check the after taxes calculation.
Just noticed your edit. If you don't mind me asking, what do you mean that I have to check the after taxes calculation? Do I have to perform again,

$$\int_2^{10} {ug(u) du = \int_2^{10} {u \frac{2.5}{u^2} du} = \int_2^{10} {\frac{2.5}{u} du}$$

but do the following instead to find out his after taxes calculation?

$$\int_2^{10} {\frac{.725}{u} du}$$

Though, you said the pdf is still the same regardless. Therefore, is there a special equation I must use to get his density function after the individual pays the 29% tax? Or is it just pure straightforward logic I do not seem to be understanding?

OlderDan

Homework Helper
KataKoniK said:
Just noticed your edit. If you don't mind me asking, what do you mean that I have to check the after taxes calculation?
Nothing complicated, and it has nothing to do with the PDF. If the tax is 29% the guy only gets to keep 71% of what he earns. I don't know where your division by 1.27 comes from. It should be his hourly earnings times (1-0.29)

KataKoniK

Thank you. My logic just failed me there.

geosonel

unfortunately, you answered only 1 of 4 problem questions correctly:

Code:

1) determine pdf of HOURLY EARNINGS             2.5/u^2             25/u^2
u: [2, 10]          u: [20, 100]

2) calculate mean hourly earnings             $40.236$ 40.236

3) calculate variance of hourly earnings         3.810                381

4) determine pdf of hourly earnings after       2.5/u^2           17.75/w^2
29% taxes                                  u: [2, 10]        w: [14.2, 71]
pdf of specific quantity (like HOURLY EARNINGS) requires transformation of variables to obtain required pdf. pdf will change for each new specific quantity.

the pdf has very formal definition and changes with each new quantity.

Last edited:

Physics Forums Values

We Value Quality
• Topics based on mainstream science
• Proper English grammar and spelling
We Value Civility
• Positive and compassionate attitudes
• Patience while debating
We Value Productivity
• Disciplined to remain on-topic
• Recognition of own weaknesses
• Solo and co-op problem solving