Joint Probability Density Function and Conditional Density

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
oh I don't see that so I'll show people you're so very good so far let me know if it says image full I hope it doesn't say that halfway through so this is X between 1 & 2 and I don't have a story for this what the X is and Y is but could be anything X is how long it takes to cook or was it we said the owl that rich was looking at and Y will be how long it takes to cook that bald eagle or no we in trouble now on video you know yeah I'm in trouble there we don't cook anything people don't come after me please I'm vegetarian I only had two cheeseburgers yesterday's Spring Fling 2 for 2 bucks can go wrong with them and my first question we're going to go through like a stack of questions my first question is this a valid density function joint density function so is it a valid joint density function that's how lazy I am is it like it's not much writing there but I don't put it there so that's the first question well we can we can see if it's a valid density function or not for what value of K we'll make it a valid density function that's probably better that question because I'm going to make it a valid density function come hi come law this would be a valid density function by using the right K so what should I use for K that will make it a valid density function what could be a valid density function if you double integrate I can pull the K outside X goes from where one to two Y goes from what four to five x plus y DX dy has to equal to one and they'll be x squared over 2 plus XY and after from whether 1 to 2 we said X is going to so integrate with respect to X which means Y becomes a constant so when X is 2 that's what 4 divided by 2 that's a 2 plus 2 y - when X is 1 that's what 1/2 plus y 2 minus 1/2 is F 3 halves + 2 y - y is a y right and we want that to equal to 1 let's integrate with respect to Y that would make it what 3 halves y plus y squared over 2 1 equals 1 let's plug in when it's 5 15 over 2 plus is that 25 over 2 when X is 4 12 divided by 2 which is what 6 16 divided by 2 which is what 8 15 and 25 is 40 40 divided by 2 will make it what 20 20 - what what's that number 14 a 6 so K equals what 1 6 member the problem I stopped by writing 1 6 early because I took the problem from the book there so that's what how they came up with the 1 6 on the front when they make these questions some of you just said that let's do this and the only thing that just is make sure that's a valid density function you can find the value for K to make it a valid density it's not some way like an Einstein figure or the limits wow that's brilliant they just work it backward I could have made this x squared Y cube and go through the whole process and see what case should be I can pick any value for x from where to where the same thing for y so we'll make these questions for the test by just a dunk I'm feeling like I'm going to make this function you know this is just ignore the sheet for a second oh I'm feeling like I'm going to make it to x-squared plus e to the Y you know now put a K there and X between what you pick a number 12 and 13 yep that sounds good why between what 0 and 5 yeah that sounds good so you work the problem back we're not going to do this but that's what we do then you make the problem you work it back when you integrate that and it should give you a value of 1 you can find what case should be so don't be impressed when you see a problem like this all wow they get these numbers working out beautifully so that's the first question is this a valid density function or what value for K that will make it a valid density function what else did we do last time we found that marginal density right probability density so what was the marginal probability density from last class when you hear that that's really F of X of X and this is f of sometimes I call them G when it's Y that's just me so sometimes you'll hear me say G sub YY when it's little Y value F I use F for x and g 4y don't be surprised if you hear me use that I have a habit of switching them not sure where that's stuck in my head when you say find f of X that means F of XX find G sub y that's we talked about this one which is f of YY and if you remember F if as a function of X here you want to find it what do we do we integrate with respect to what respect to Y because you want your answer to be as a function of X Scott right so you want to eliminate all the Y's and just leave your answer as a function of X when you're looking for Y the function as the result as a function of Y you need to get rid of X the integral over X so let's integrate that I'm going with respect to Y y is down from where to it for that problem was it four to five one six x plus y dy there's the one six with respect to Y that would be what XY plus y squared over two y equals four to y equals five was a 5-4 605 okay and when y is five that would be five fear then the minus 4 that be one I'm just simplifying my head when it's this guy here Y is five that's worth twenty five over two - what 16 over 2 is that 9 over 2 is it 9 over 2 yep so that's what f of X of X 1 6x plus 9 over 2 this one will be 1 over 6 the interval from where to where or was X going from 1 to 2 X plus y that's with respect to it X that would be x squared over 2 plus X Y X going from 1 to x equals 2 now when X is 2 let's look at it that's 4 divided by 2 which is what 2 - a 1/2 s 3 halves let's look at this second piece when X is 2 that's 2 y minus the 1 y that's 1 Y so it's actually 1/6 I like the wire written first so I found both of these marginal probability density functions now other questions we might ask you can you tell me these are new stuff now we think we did that last time by the way is the function the joint density function is that independent functions X independent of Y for the function to be independent for x and y to be independent so is X independent of why I'm asking the next question trying to cover all the stuff we did last time for the answer to be yes if what it's if f of X comma Y is equal to f of X x times F of Y Y if you can prove that then they are independent what is my F of xx I have it here 1/6 X plus 9 over 2 what's F of Y y1 6 times what Y plus 3 halves I'll take that's x here I'll do the square brackets will be a better choice here so this one times that one does that equal to one over six x plus y doesn't look like it I can see already 1 over 36 here are they equal doesn't look like it no they are not independent and that's what we did last class remember that every one we did the marginal density function f of XX marginal density function f of YY now let's take a look at the conditional distribution remember the probability of Y given X we live the condition of the probability Y given X we said this is what the probability of x and y divided by what the probability of Y that's how you find the probability of Y given X I think around maybe two months ago well when you have a joint density function we call these conditional distributions again what we mean by this can you tell me what is the probability of this happening knowing that X already happened like question what is the probability down Trump will win the Republican nominee given I know Louis not here given Ted Cruz just chose a VP his running mate you know so we know that happen we know Ted Cruz yesterday announced he actually selected for your arena to be his running mate so what's the chance now if doctor I'm still going to win the election knowing that happened probably increase the result nobody likes Ted Cruz he labels imperfect the line Ted you know I'll tell you that guys I should give him an award for coming up with names he's even better than me he gives names to everyone his name is nothing mistakes to you to god Lewis I miss Lewis today luis been gone for a while okay so we're going to find the probability of Y given X this is the condition I'll give me some room here right the way the book writes them what's the probability density of y know 1x they ran like this and just like this it is actually the joint density function of both of them divided by the marginal density function this is given X by the way that white it's always the given one I wrote that wrong whatever the given one the given is x here so this is divided by f of X of X and if you want to find f of X given Y I'm just to the dyslexic these guys have to be matching I don't know why I'm switching this is Y given X that's correct yeah that's good so this will be what f of X comma Y divided by what the given one which is f of Y y knowing that already happened so for the previous example we just finished doing so the one we just did here for this question if you want to find the answer to them what is f of Y given X we know what f of X and why it's 1/6 X plus y divided by f of XX which is 1/6 X plus 9 over 2 click now what they might do there they might have fun with you that you know with this question can you tell me what is f of Y given X of y given x equals 2 oh wait X was between what 1 & 2 right let's use 1.5 or know 1 x is 1.5 what's the answer you go back to that function what do you do with it you replace X with what 1.2 so that would be 1 point 2 plus y over one point two plus four point five fight one point two plus y over five point seven so you tell me what value of well I'll tell you what the answer is add that x value y between 4 & 5 right so if you want it when y equals 4 you let Y be 4 and y equals 5 we let y be 5 y equals 4 point 5 you put in 4.5 there and we can find also the proud new joint density of 1/2 of X given Y correct yep the probability and any event is between 0 & 1 and the sum of the probability it's always between I mean it's always equal to 1 so for example if I give you this one with Y was 5 then it would have been over yep yep so if it's 5 that would be what six point two that can't be up because they can't be more than one that missed I wouldn't reach it there you know so let's take an example here I'm just looking the back of a book here I find a book in front of me I'm looking for examples that we can go through different ones okay this actually the interesting problem here here is what we know we have a function again this is going back to calculus to make sure your integrations are good eight X Y and x and y here we go belong to the area a and zero otherwise x and y does not belong to a what is a we're talking about this region from 0 to 100 where's McDonald gonna come here now you'll see and walk and look at the board so you have to be in this region love the guy let's please help you're in this region that's the region a so what's the height here by the way let's be a1 right it's y equals 2x when X is 1 Y is 1 if I ask you for example what is the probability Scottie's that the probability can be more than 1 and notice if you find the area of this so if you want to find the entire area of that it's 1/2 the base times the height is triangle right so that's less than 1 that's equal to 1 but find the probability of X is greater than point or 0.5 and Y is less than 0.5 if I just graph this mathematically if I just graph it y equals 2x this is the point 5 right here and let's say this is the point 5 in the Y Direction X is bigger than or equal to 0.5 Y is less than 0.5 we talking about this box right there how are we so I can do the Mac and go integrate that or I can just look at the picture and say I know what my answer is length times width which is what 0.25 and you think you get the right answer what do you think not really this is you're thinking again just of a year devil Angela the definition for that it's really the double integral from where to where X going from 0.5 to 1 Y is going from where to where Z Y is going 0 to 0.5 I'll take that yep my function is what 8xy 0.5 to 1 that's DX first dy second integrate that where we have with respect to X that becomes x squared over two that's four x squared Y from point five to one when X is one that's four oh boy what does that need a calculator for minus 0.25 times 4 0 1 that's 3 1 so 4 y -1 Y I think that's a three-wide which will be what 3 y squared over 2 Y goes from 0 to y equals 0.5 when it's 0.5 where we have that's 1/2 3 over 4 that's 3 over 8 which is what 0.375 remember if you just multiply this together you go that's triangle the area's one but if you double integrate that it better be not at 0.5 it should be 1 to be a valid density function so don't just look at the picture go that's I know what that is that's a square there because if I double integrate that it should give me a value of 1 if my integration is correct how would I integrate that which way you want to take strips horizontally or vertically you decide vertically you want to add these little pieces each time yep we just find the area using like so that would be what to see if it's valid X is going from 0 to 1 Y is going from where 0 Q naught to 1 to X right 8 X Y we're doing dy DX like this are you going to give area I might give you a shape some like this or say X between 0 and 1 y between 0 and 1 and y equals 2x so then you have to draw the picture and see I might say in the area there but I'm going to give you something where the limit is not going to be 0 to 1 0 to 1 you have to think about the integration like this one here Y is going from 0 it's not going over it to 1 every see if you go 0 to 1 that means each one of these pieces going as high as 1 tell them go as high as 1 the only go to that line so that's where your calculus comes in so you integrate that that's what Y squared divided by 2 that's 4 X Y squared from y equals 0 to y equals 2x when y is X here where we have 4 X cube right integrate that what are you going to have X to the fourth and X is going from 0 to 1 when X is 1 that's 1 minus 0 which is 1 and that is a valid density function but if you just find the area of that 1/2 the base times the height that's a triangle you are getting what 1/2 so don't go by the area that I'm just saying the your function X&Y is good in between these numbers so you still have to integrate that now let's say I want to find a joint density function I'll do the marginal that the conditional ones I'll go through the whole thing with it I just wanted to clarify it's not the area there now with double integral single integral that's what we did the area with single integration that's one of the application of that interval is you find the area under the curve so now what about what is f of XX I miss my coffee this morning I drank it quickly so that's with respect to X I wheat the function as a function of X so I need to take Y and integrate Y and again look at the picture where is y going from does it go from 0 to 1 or 0 to X 0 to X and X is going to go from 0 to 1 notice the x value goes from 0 to 1 but the Y value goes from here to that line 0 to X so if you plug it in here with respect to Y what are we going to have for X Y squared Y goes from 0 to y equals x that will be what 4x cubed and X between 0 and 1 if I want to find fyy again same thing now this will be a bit tricky at integration what are you going from let's look at this now your interview with respect to X right so the x value start from the first one from 0 to 1 but the next piece where you start from you start like from here and the next one from here to there and the next one from here to there so you're not starting from 0 all the time you're starting from this x value to 1 but you want your answer as a function of Y so if you go from X to 1 we in trouble there since x equals 2y this will be from Y to 1 because you want to come up with an expression that has Y in it so it starts from here the next one starts from here to there from here to there so from the x value can say from X to 1 but if you go from X to 1 you will lose Y and your goal is to get your function as a function of Y well since y equals 2x then you put a white in place of it with respect to X that would be what 4x squared Y and X is going from y to x equals to 1 when X is 1 what do you have for y when x is y what do you have for y cubed and again Y between 0 & 1 what else we did we did the conditional one the conditional one is what it is f of X given Y that's f of X comma Y divided by what F of Y of Y the given one is always goes on the bottom so that should be what what's f of X given Y 8 XY lip divided by F of Y Y we can factor the 4 out to X Y so actually the Y can do yep I can lose the Y if i factor a y out 1 minus y squared right so you end up with what 2 X 1 minus y squared again if they give me a number for y I can plug it in tell you what f of X is going to equal 2 and what is f of Y given X notice I could add you asked for these two questions you still got to do the other pieces if I just ask for these two sometimes I can be like it sounds like a nice bag give me this and give me that well you can't answer this if you don't know what F of Y y and F of XX it's really going to do it before you can answer that one and it gets worse as you'll see that yep this is given X so that's f of X comma Y over f of X of X f of X comma Y which is what 8xy f of X of X I losted I see 4 X cubed simplify that to Y over x squared so if they're going to give you a value for that again where's X going from where - a zero to one was it what was X for that problem I think what zero to one so we might say what is f oh I hate the writing this Y given X Y get I'll do this Y given X but instead of saying X point B just go even over two point five that means y given x equals point five so you let X be 0.5 and that expression that's point two five that's 1/4 that's eight Y Ashley what was that question you asked me about it Scott Scott asked me about this because he was is this one where was it scotch was it this problem when y equals five you said that would be more than yes okay what about the question because I was thinking about it when I was talking about this let me just put these in the right order so I don't lose them here's what I found on that previous example and the previous examples God didn't like this and I came up with an answer of X plus y over X plus 9 over 2 I think that's what I came up with so if I ask you what is f of Y given X y when x equals 1.2 I think that's what we did there and we came up with what 1.2 plus y over 5.7 and good so what's the problem the problem is more than one let me ask you the question what's the probability going back to that problem that Y is less than well the Y value going from where towards a four to five for that one let's say Y that was four to five what is the probability Y would be less than or equal to pick a number between four and five any number you want two five one five I'll do four point seven first because I know where you're going with it Scott I know exactly where Scott's going he wants to answer more than one he's not going to get an answer more than one I'm going to show him so I'll do the four point seven given x equals one point two that's what he's asking we know when x equals one point two well the answer to that is not plug it into this one it is the integral of the function as Y goes from where to where from four and what you say to me four point seven with respect to Y that would be your answer to get the probability the function might be more than one but not the probability yep so integrate that I can take the one over five point seven out now come back now put the five I should answer at that time for him there but I was trying to think when I was doing the other problem with the best way to approach it so that would be one over five point seven and integrate that that's what 1.2 y plus what y squared over 2 as Y goes from four to four point seven and I'm not sure what that number is but I am positive if we did the math correctly my answer is going to be less than one what is the calculator if we did the math correctly we should have an answer of less than one so here we go one point two times four point seven plus one point two squared I mean plus four point seven squared divided by two divided by five point seven at the upper limit was two point nine two seven let's look at the lower limit one point two times four plus four square which is 60 and divided by 2 that's 8 divide that by five point seven two point two four six so let's subtract them two point nine two seven minus two point two four six the answer is point six eight one is that way you got twenty said that early yep so notice that answer is more than one so Ascot wanted to know what happens if you go to five because I know what he was going with that he wants to know if the answer is going to be more than one so let's see if you go into five we covering all of them given X equals one point two so that's the integral from 4 to 5 of 1 point 2 plus y divided by five point seven dy so now let's plug it in with respect to Y this back to the one point I mean one over five point seven one point two y plus y squared from four to five one point two times five that's the way to look at it plus 25 that's a thirty-one right minus one point two times four plus the 1620 point eight 31 minus twenty point eight develop let's not write the number let me double-check exactly 1 p.m. should be 1 so I did some 1.2 times 5y score yes that's what it was here I forgot that square over 2 so plus what 25/2 18.5 and then number because you're coverin all them has to be a 1 you're going all the way from 0 to 4 you cover every single possibility when it's for 1.2 times 4 plus 4 squared 16 divided by 2 that's 8 12.8 so what's 18 point five minus twelve point eight five point seven over five point seven bingo so the if you're covering all the cases you going from the smallest value to the largest value the earlier better be a one you're welcome so f of x and y there's not a presenta probability probabilities the integral of that I should have said that earlier so if you would the knowit's but I thought about it after that's not going to go back to that one make sure we clear on it I'll squeeze these two sheets of notes between the other ones I know where the other ones are or this one here so I can squeeze up mr. McDonald how are you okay yes fine you're okay
Info
Channel: Zahi Haddad
Views: 19,507
Rating: 4.9454546 out of 5
Keywords:
Id: TLWPWRqjQlw
Channel Id: undefined
Length: 48min 46sec (2926 seconds)
Published: Thu Apr 28 2016
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.