Page 1 of 2 12 LastLast
Results 1 to 15 of 16

Thread: Questions : uniform distribution, integrals

  1. #1
    Junior Member
    Joined
    Mar 2017
    From
    France
    Posts
    31

    Questions : uniform distribution, integrals

    Hello ! I have some difficulty understanding operations on integrals and how they work. I thank you for your help
    Here are some of the questions I got while trying an exercise :

    We consider a variable X following a uniform distribution on [0;1] : X ~ U([0;1])

    Its density is


    1) Show that the distribution function of X is

    1 \end{cases}" class="tex">

    2) Y = X. Calculate E(Y) and var(Y).

    3) Calculate P(Yy), the repartition function of Y, and deduce Y's density. Draw its graph.


    1) Here is what I had answered originally after watching a video on the uniform distribution :

    For x<0, f(x) is not defined so f(x)=0 et p(X0)= 0
    So we have Fx(x) = 0

    For x[0;1], f(x) = 1/(-).


    Here I have no idea how the x went from the integral into the division or why alpha would = 0.

    Finally, by definition, if x>1, Fx(x) = 1.

    All this is probably wrong but I don't know why. I also heard of the terms characteristic function and identity function with regards to the integral but I have no idea what they are.



    I also saw another way to operate :



    if x < 0 then f(x) = 0 and F(x) = 0

    if 0 < x < 1 then

    if 1 < x then



    But here I'm not sure how the operations on integrals work :
    - why write an integral from -oo to 0, when the function is defined only for [0;1] ?
    - how do the operations work for the integral from 0 to x ? Why can we say that f(t)dt = 1 in this case and how to calculate the integral from 0 to x of 1dt ? I guess it is equal to x but how do we get the x from the integral and put it into the function to get a result ?



    2 and 3) Left aside for now.
    Follow Math Help Forum on Facebook and Google+

  2. #2
    MHF Contributor

    Joined
    Apr 2005
    Posts
    19,415
    Thanks
    2889

    Re: Questions : uniform distribution, integrals

    Quote Originally Posted by Jo37 View Post
    Hello ! I have some difficulty understanding operations on integrals and how they work. I thank you for your help
    Here are some of the questions I got while trying an exercise :

    We consider a variable X following a uniform distribution on [0;1] : X ~ U([0;1])

    Its density is
    It would be better to include "p(x)= 0 if x< 0" since that is included in the distribution function.

    1) Show that the distribution function of X is

    1 \end{cases}" class="tex">

    2) Y = X. Calculate E(Y) and var(Y).

    3) Calculate P(Yy), the repartition function of Y, and deduce Y's density. Draw its graph.


    1) Here is what I had answered originally after watching a video on the uniform distribution :

    For x<0, f(x) is not defined so f(x)=0 et p(X0)= 0
    So we have Fx(x) = 0.
    Yes, the integral from -\infty to any x less than or equal to 0 is 0.

    For x[0;1], f(x) = 1/(-).
    Are you just copying a formula? F(x\le X) is defined as \int_{-\infty}^X f(x)dx and, strictly speaking is function of X, not x. Here the integral from -\infty to 0 is 0 so we have just \int_0^X 1 dx= X- 0= X.

    Here I have no idea how the x went from the integral into the division or why alpha would = 0.
    What is \int 1 dx? How are alpha and beta defined in the formula you were using?

    Finally, by definition, if x>1, Fx(x) = 1.
    I would not say "by definition". Rather F_x(X)= \int_{-\infty}^X f(x)dx. Since f(x)= 0 both for x< 0 and x>1, with X> 1 that is just \int_0^1 1 dx= 1.

    All this is probably wrong but I don't know why. I also heard of the terms characteristic function and identity function with regards to the integral but I have no idea what they are.



    I also saw another way to operate :

    I would not say that was "another way"- that is what you should have been doing.

    if x < 0 then f(x) = 0 and F(x) = 0

    if 0 < x < 1 then

    if 1 < x then



    But here I'm not sure how the operations on integrals work :
    - why write an integral from -oo to 0, when the function is defined only for [0;1] ?
    Because the function is not "defined only for [0;1]"! The function is defined to be 0 for x< 0 or x> 1 but it is still defined.

    - how do the operations work for the integral from 0 to x ? Why can we say that f(t)dt = 1 in this case and how to calculate the integral from 0 to x of 1dt ? I guess it is equal to x but how do we get the x from the integral and put it into the function to get a result ?
    You seem to be saying that you have never taken a Calculus course and do not know how to integrate. If that is true then you had better talk to you teacher about this immediately. The course clearly should have Calculus as a pre-requisite.

    This problem uses the very basic facts that \int_a^b 0 dx= \left[0\right]_a^b= 0 and \int_a^b 1 dx= \left[x\right_a^b= b- a. The integrals are going to get a lot more complicated!



    2 and 3) Left aside for now.
    Last edited by HallsofIvy; Apr 2nd 2017 at 05:25 AM.
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Junior Member
    Joined
    Mar 2017
    From
    France
    Posts
    31

    Re: Questions : uniform distribution, integrals

    Thank you for your reply ! I am just following this class as an e-learning course and trying to understand by myself. I know the integral is used to obtain the area below a function but I never studied properties/operations on integrals besides
     {\displaystyle \int _{a}^{b}\!f(x)\,dx=F(b)-F(a).}

    Are you just copying a formula?
    Yes I was trying to use the probability density function of the continuous uniform distribution found on wikipedia.

    \int_a^b 0 dx= \left[0\right]_a^b= 0  and \int_a^b 1 dx= \left[x]\right_a^b= b- a

    Sorry to ask such basic questions (try not to scream while reading them ahah) :

    What does it mean to integrate 0dx from a to b ? What area would 0dx represent ? For me 0 is supposed to be a function f(x) and dx is the variable according to which we are trying to integrate ?

    Is 1dx equal to x ? Then x varies in [a;b] so the sum of the area of the function is F(b) - F(a) = b - a because F(x) = x ?



    Would you have a comprehensive website to recommend to study those basics ?
    I don't want to waste your time asking too many stupid questions but I'm not finding simple explanations.
    Follow Math Help Forum on Facebook and Google+

  4. #4
    Newbie
    Joined
    Mar 2017
    From
    Ohio
    Posts
    14

    Re: Questions : uniform distribution, integrals

    HallsofIvy gave you a very kind reply. From what you posted, seems that your ability to work with Calculus is too weak for this work. This isn't meant to be discourteous - rather to help you find a sensible way into this material. It doesn't make sense to continue with this course if it applies Calculus as a main tool. It will just frustrate you. A discussion with the instructor about prerequisites is a great recommendation.

    Isaac Newton was from England. Leibniz from Germany. I'm sure they have relatives wandering around in France somewhere - probably still arguing with each other. They can help you pick up more Calc. :-) Couldn't resist bringing it up - you're in such a history rich part of the world!
    Last edited by mgeile; Apr 2nd 2017 at 07:14 AM.
    Follow Math Help Forum on Facebook and Google+

  5. #5
    Junior Member
    Joined
    Mar 2017
    From
    France
    Posts
    31

    Re: Questions : uniform distribution, integrals

    Ahah thanks. The course is just an introduction to probability course and seldom uses integrals. I think I should be able to figure this out, it doesn't get more complicated than this exercise... I just need to be enlightened about the basics of integrals ! However I get your recommendations and will check out some calculus first before bothering you with other bad questions.
    Last edited by Jo37; Apr 2nd 2017 at 07:30 AM.
    Follow Math Help Forum on Facebook and Google+

  6. #6
    MHF Contributor

    Joined
    Apr 2005
    Posts
    19,415
    Thanks
    2889

    Re: Questions : uniform distribution, integrals

    [QUOTE=Jo37;918947]Thank you for your reply ! I am just following this class as an e-learning course and trying to understand by myself. I know the integral is used to obtain the area below a function but I never studied properties/operations on integrals besides
     {\displaystyle \int _{a}^{b}\!f(x)\,dx=F(b)-F(a).}
    Where "F" is an anti-derivative of ''f"- that is F'(x)= f(x).


    Yes I was trying to use the probability density function of the continuous uniform distribution found on wikipedia.

    \int_a^b 0 dx= \left[0\right]_a^b= 0  and \int_a^b 1 dx= \left[x]\right_a^b= b- a
    Since the derivative of f(x)= x is 1, \int_a^b c dx= c\int_a^b 1 dx= c\left[x\right]_a^b= c(b- a). If c= 0, the integral is 0(b- a)= 0. If c= 1, the integral is 1(b- a)= b- a.

    Sorry to ask such basic questions (try not to scream while reading them ahah) :
    Screaming is good for me, it exercises the lungs.

    What does it mean to integrate 0dx from a to b ? What area would 0dx represent ? For me 0 is supposed to be a function f(x) and dx is the variable according to which we are trying to integrate ?
    The graph of y= f(x)= c, where c is any constant, is a horizontal line. The region under that line, between x= a and x= b, is a rectangle with height c and width b- a so area c(b- a). In the particular case that c= 0, this is a single line with "area" 0.

    Is 1dx equal to x ? Then x varies in [a;b] so the sum of the area of the function is F(b) - F(a) = b - a because F(x) = x ?
    Yes. If F(x)= x, then its derivative F'(x)= 1 so the "anti-derivative" of "1" is "x".


    Would you have a comprehensive website to recommend to study those basics ?
    I don't want to waste your time asking too many stupid questions but I'm not finding simple explanations.
    Try the "M.I.T. Open Coursework" at
    https://ocw.mit.edu/courses/find-by-...ubcat=calculus
    Follow Math Help Forum on Facebook and Google+

  7. #7
    Newbie
    Joined
    Mar 2017
    From
    Ohio
    Posts
    14

    Re: Questions : uniform distribution, integrals

    Quote Originally Posted by Jo37 View Post
    Ahah thanks. The course is just an introduction to probability course and seldom uses integrals. I think I should be able to figure this out, it doesn't get more complicated than this exercise... I just need to be enlightened about the basics of integrals ! However I get your recommendations and will check out some calculus first before bothering you with other bad questions.
    It's not a bother. Just that if we just give you an answer it does nothing for you. I can tell you aren't convinced yet. Let me outline the approach I would take to this problem; note that I'm out of practice and context, so your instructor / text may have a different approach.

    Problem 1. For the normal distribution:

    Suppose X is a random variable with a normal probability distribution, i.e.,  f(x) = \begin{cases} 1, x \in [0,1]\\ 0, \textrm{otherwise}\\ \end{cases}

    find the (cumulative) distribution.

    Approach to 1: Let X represent the random variable. Then compute \textrm{Prob}(X < x) = F(x) = \int_{-\infty}^{x} {f(z) dz} . Hint: There are three cases in the result as your problem statement suggests.

    Problem 2: For R.V.'s X and Y where Y = \sqrt{X}, find E(Y), Var(Y).

    Approach to 2:
    Compute E(Y) = E(\sqrt{X}) = \int_{-\infty}^{\infty}{\sqrt{X} f(x) dx}. The results is 2/3.
    In a problem or in the text, you probably should have learned / found that \textrm{Var}(Y) = E(Y^2) - [E(Y)]^2. E(Y^2) = E(X) = 1/2 (by inspection - why?). So \textrm{Var}(Y) = 2/3 - 1/2 = 1/6.

    Problem 3: Calculate the (cumulative) probability function of y and the probability density function of y.

    Approach to 3 (more calculus):

    You might be given a formula ... but you really don't need it for this problem and want to think through what the variables and functions are doing since this is one of the easier problems in probability - cutting your teeth.

    Recognize that P(Y < y) = P(\sqrt{X} < y) = P(X < y^2). Now you can calculate P(Y < y) = F(y) = \int_{-\infty}^{y^2}{f(x) dx}.
    Once you find that result, recognize that f(y) = F'(y) and compute it. There is a nagging math detail that remains - the derivative of F does not exist at x = 1. But it's a single point and so has zero area under it; you can set it to whatever value you want. I would set f(1) = 2; you'll see when you get there.

    In closing ...

    I didn't check this all that close - so sorry in advance if I slipped here and there. But this gives you a path to travel and shows that calculus is being used several places in just this one early problem. Please consider the earlier advice. Calculus is amazing to learn - take the time to understand it before you try a calc-based stats course.
    Last edited by mgeile; Apr 2nd 2017 at 09:58 AM.
    Follow Math Help Forum on Facebook and Google+

  8. #8
    Junior Member
    Joined
    Mar 2017
    From
    France
    Posts
    31

    Re: Questions : uniform distribution, integrals

    Thank you both so much for taking the time to give detailed answers, you are really kind souls ! It really helps me to understand the subject. Here is what I wrote for 1) and 2) from what you stated :


    1)
    For x<0, f(x)=0 and F(X) = p(X<=0) = 0


    For 0 < x < 1

    We know f(x) = 1 when 0 < x < 1 :

    So we get :

    F(x\leq X) = \int_{-oo}^{X} f(x)dx =  \int_{-oo}^{0}f(x)dx + \int_{0}^{1}f(x)dx = \int_{0}^{1}f(x)dx = 0 + \int_{0}^{1}1dx = [x]_{0}^{X}= X - 0 = X


    For 1 < x
    We can say that f(x)= 0. That was also the case for x<0. To get F(X), we thus only need to calculate the one integral not equal to 0 : the integral from 0 to 1 of f(x).

    \int_{0}^{1}f(x)dx = \int_{0}^{1}f(x)dx = 0 + \int_{0}^{1}1dx = [x]_{0}^{1}= 1 - 0 = 1



    2) As mcgeile stated :

    E(Y) = E(\sqrt{X)} = \int_{-oo}^{+oo}\sqrt{x}f(x)dx

    So :
    \int_{-oo}^{+oo}\sqrt{x}f(x)dx = \int_{-oo}^{0}\sqrt{x}f(x)dx + \int_{0}^{1}\sqrt{x}f(x)dx + \int_{1}^{+oo}\sqrt{x}f(x)dx = 0 + \int_{0}^{1}\sqrt{x}f(x)dx + 0 = \int_{0}^{1} \sqrt{x} 1dx = [\frac{2}{3}x^{\frac{3}{2}}x]_{0}^{1} = \frac{2}{3}*1*1 - 0 = 2/3


    E(Y^{2}) = E(X) = \int_{-oo}^{+oo}xf(x)dx = \int_{-oo}^{0}xf(x)dx + \int_{0}^{1}xf(x)dx + \int_{1}^{+oo}xf(x)dx = \int_{0}^{1}xf(x)dx = \int_{0}^{1}x1dx = [\frac{1}{2}x^{{\frac{4}{2}}}x]_{0}^{1} = \frac{1}{2}<br />
    So I found :

    V(Y)= E(Y^{2})-E(Y)^{2} = E(X) - (\frac{2}{3})^{2} = \frac{1}{2} - \frac{4}{9} = \frac{1}{18}<br />
    Which is not 1/6. Did I go wrong somewhere ?
    Last edited by Jo37; Apr 3rd 2017 at 02:06 PM.
    Follow Math Help Forum on Facebook and Google+

  9. #9
    Newbie
    Joined
    Mar 2017
    From
    Ohio
    Posts
    14

    Re: Questions : uniform distribution, integrals

    No - you have it right. I made an error and used f(x) = x instead of f(x) = 1. See - don't ever completely trust the help!
    Follow Math Help Forum on Facebook and Google+

  10. #10
    Junior Member
    Joined
    Mar 2017
    From
    France
    Posts
    31

    Re: Questions : uniform distribution, integrals

    Ok thanks ! I've just seen I also made a mistake in my answer for 1), putting the integrals from 0 to 1 and not 0 to X !

    I tried to answer 3), here is my reasoning :


    3)
    For y<0, we know that f(x)=0 so we can say that f(y)=0 and F(Y) = p(Y0) = 0

    For 0<y<1 :
    F(y) = P(Y\leq y)= P(X<y^{2})= \int_{-oo}^{y^{2}}f(x)dx = \int_{0}^{y^{2}}f(x)dx + \int_{-oo}^{0}f(x)dx = 0 + \int_{0}^{y^{2}}1dx = [x]_{0}^{y^{2}} = y^{2}<br />

    For 1<y :
    <br />
F(y) =  \int_{-oo}^{y^{2}}f(x)dx = \int_{1}^{y^{2}}f(x)dx +\int_{0}^{1}f(x)dx + \int_{-oo}^{0}f(x)dx = 0 + 1 + \int_{1}^{y^{2}}0dx = 1 + [0]_{1}^{y^{2}} = 1<br />

    From those results, we can derive the density function of y :

    For y<0: F'(y) = 0
    For 0<y<1: F'(y) = (1/3)x^3
    For 1<y : F'(y) = 0


    I'm not sure that's right however given that you said
    Once you find that result, recognize that f(y) = F'(y) and compute it. There is a nagging math detail that remains - the derivative of F does not exist at x = 1. But it's a single point and so has zero area under it; you can set it to whatever value you want. I would set f(1) = 2; you'll see when you get there.
    I did not get why there is no derivative for x = 1.
    Last edited by Jo37; Apr 4th 2017 at 05:15 AM.
    Follow Math Help Forum on Facebook and Google+

  11. #11
    Newbie
    Joined
    Mar 2017
    From
    Ohio
    Posts
    14

    Re: Questions : uniform distribution, integrals

    You might consider using a tex case statement and write out F(y) - simply restate your final result. Some of your limits are in error so you might clean those up. Also, scratch a plot of F(y) for yourself - you'll see that the function is continuous but shifts at y = 1.

    For computing f(y), you need to take the derivative ... more calculus; you're stuck in integral mode and identified the need for derivative, but then took an integral. Forgive a little criticism, but it looks like you just blindly copied what I wrote and then computed something else (yellow card!).

    F'(y) means dF/dy in this case. You'll see that the derivative left of 1 approaches 2 (in the limit - another tool critically in use by calculus) and from the right is zero. By the definition of a derivative of a function at a point, the derivative does not exist at y = 1. As I said, this is a math detail that few who took a course in calculus will pick up but those who understand calculus will. I wouldn't worry about it now ... just a point of interest that shows how these little complications show up in the most simple problems.

    BTW - keep up the good work. And really consider taking calculus when you can. Most of the philosophers of antiquity (these were the early math guys) were fixated on what motion was all about - how it actually worked in space. It's part of most interesting physical (physics) events like watering a plant (agriculture) or when someone throws a rock at someone else (military). Calculus is all about motion - and so much more. The basics are: 1) the limit ... approaching a value but not actually getting there, 2) the derivative - useful in computing things about motion like velocity and acceleration, 3) the integral which is about the area under a curve. That's the first semester of calculus. The second (and usually) third semesters are usually about applications of calculus and also move to multi-dimensions and vector spaces. So worth you're time, even if you never use it. If you're like most of us, you need to get past the courses so you can get a better job and feed yourself and others. But some points of philosophy are worth picking up in your spare time. I think Calculus is one of those. But I'd also warn, it's a gateway drug (area) into other math that can consume you - beware. There are many hungry mathematicians.
    Last edited by mgeile; Apr 4th 2017 at 06:19 AM.
    Follow Math Help Forum on Facebook and Google+

  12. #12
    Junior Member
    Joined
    Mar 2017
    From
    France
    Posts
    31

    Re: Questions : uniform distribution, integrals

    Well it seemed to me like the question required exactly the same approach as the one adopted to find the cumulative distribution function F(x) ? Since you've shown me how to express P(Y<y) as P(X<y), I simply used the same tools and broke the integral into the 3 different cases, corresponding to the different values of f(x) at different intervals. So yes it was just dumb computing but I only saw this way to operate !

    Some of your limits are in error so you might clean those up.
    I don't see mistakes in the limits of the integrals for 3) ? Or are you talking about 2) ?

    For computing f(y), you need to take the derivative ... more calculus; you're stuck in integral mode and identified the need for derivative, but then took an integral.
    This is what I thought I did with :

    For y<0: F(y) = 0 so F'(y) = 0

    For 0<y<1: F(y) = y F'(y) = (1/3)y^3

    For 1<y : F(y) = 1 so F'(y) = 0

    Is that wrong ? ahah
    I might have gotten confused between Y,y and X,x and what each one represents.


    Once again, thank you ! Point taken for calculus, I'm actually a law and biology student but I took a big interest math and computer science, so I'm trying to use e-learning to get a bachelor and maybe switch majors! As you can see my abilities are weak but at least I enjoy it
    Follow Math Help Forum on Facebook and Google+

  13. #13
    Newbie
    Joined
    Mar 2017
    From
    Ohio
    Posts
    14

    Re: Questions : uniform distribution, integrals

    Quote Originally Posted by Jo37 View Post
    Well it seemed to me like the question required exactly the same approach as the one adopted to find the cumulative distribution function F(x) ? Since you've shown me how to express P(Y<y) as P(X<y), I simply used the same tools and broke the integral into the 3 different cases, corresponding to the different values of f(x) at different intervals. So yes it was just dumb computing but I only saw this way to operate !


    I don't see mistakes in the limits of the integrals for 3) ? Or are you talking about 2) ?





    This is what I thought I did with :

    For y<0: F(y) = 0 so F'(y) = 0

    For 0<y<1: F(y) = y F'(y) = (1/3)y^3

    For 1<y : F(y) = 1 so F'(y) = 0

    Is that wrong ? ahah
    I might have gotten confused between Y,y and X,x and what each one represents.


    Once again, thank you ! Point taken for calculus, I'm actually a law and biology student but I took a big interest math and computer science, so I'm trying to use e-learning to get a bachelor and maybe switch majors! As you can see my abilities are weak but at least I enjoy it
    - Oh - yes, you do have the correct limits. I just didn't notice that you reversed the intervals for the case y > 1. Normally you would process [-\infty,0],[0,1],[1,y^2].

    - Your F'(y) is wrong. Look up what a derivative is and how to compute it. At the end, use the tex case statement to write F(y) and f(y) so I can clearly see what your results are. Sometimes students leave ambiguity because they aren't confident in their results. Bald commitment to a result enhances communications, eliminates ambiguity, and will help you build confidence and others to build confidence in you. If you're lucky enough to get someone to read your work, most reviewers won't be willing to play Where's Waldo to try and figure out what the result is supposed to be.
    Follow Math Help Forum on Facebook and Google+

  14. #14
    Junior Member
    Joined
    Mar 2017
    From
    France
    Posts
    31

    Re: Questions : uniform distribution, integrals

    Sorry, here it is in TEX. And I noticed I did the primitive of y and not its derivative... Big mistake. Here is my final result :

    For y<0, F(y) = 0
      F'(y) = 0

    For 0<y<1, F(y) = y^{2}
    F'(y) = 2y

    For  1<y, F(y) = 1
    F'(y) = 0
    Follow Math Help Forum on Facebook and Google+

  15. #15
    Newbie
    Joined
    Mar 2017
    From
    Ohio
    Posts
    14

    Re: Questions : uniform distribution, integrals

    Yes - you've got it - here's a clearer, more standard form to express your result using Tex cases.

    F(y) = \begin{cases} 0, & y < 0 \\ y^2,  & 0 \le y \le 1 \\ 1, & y > 1 \end{cases}

    f(y) = \begin{cases} 0, & y < 0 \\ 2y,  & 0 \le y \le 1 \\ 0, & y > 1 \end{cases}

    You should be able to see the Tex if you mouse over it.
    Follow Math Help Forum on Facebook and Google+

Page 1 of 2 12 LastLast

Similar Math Help Forum Discussions

  1. [SOLVED] Mixing a uniform distribution with a normal distribution
    Posted in the Advanced Statistics Forum
    Replies: 4
    Last Post: Jul 8th 2011, 09:27 AM
  2. Uniform Convergence and Integrals
    Posted in the Differential Geometry Forum
    Replies: 2
    Last Post: Mar 8th 2011, 07:08 PM
  3. Uniform Distribution
    Posted in the Advanced Statistics Forum
    Replies: 1
    Last Post: May 28th 2009, 06:31 PM
  4. Uniform Distribution.
    Posted in the Advanced Statistics Forum
    Replies: 0
    Last Post: May 5th 2009, 09:16 PM
  5. Uniform distribution.
    Posted in the Advanced Statistics Forum
    Replies: 1
    Last Post: Dec 3rd 2007, 03:40 AM

/mathhelpforum @mathhelpforum