text stringlengths 1 255 | output stringlengths 1 254 |
|---|---|
So now it's time for the first quiz about mutation. | åã®å°ãã¹ãã§ã¯æååMoeãLarryãCurlyã® |
In a previous quiz, we defined the variable stooges to hold 3 strings, strings Moe, Larry and Curly. | 3ã€ã®æååãä¿æãããªã¹ãstoogesãå®çŸ©ããŸãã ããããThree Stoogesãã§ã¯ã«ãŒãªãŒã®ä»£ããã« ã·ã§ã³ããç»å ŽããåããããŸãã |
But in some of the Stooges films, | ãªã®ã§ãã®å°ãã¹ãã§ã¯ |
Curly was replaced by Shemp, so your goal for this quiz is to write 1 line of code that changes the value of stooges to be the list containing 3 strings, | stoogesã®å€ãæååMoeãLarryãShempãå«ã ãªã¹ãã«å€æŽãããã㪠ã³ãŒãã1è¡æžããŠãã ãã |
Moe, Larry, and Shemp, but doesn't create any new list object. | ãã ããªã¹ããªããžã§ã¯ãã¯æ°ãã«äœæããŸãã |
In Kalman filter land, we're going to build a 2-dimensional estimate. | æ°Žå¹³æ¹åã¯äœçœ®ã§åçŽæ¹åã¯é床ã§ã é床ã¯XããããšããŸã |
1 for the location, and 1 for the velocity denoted x dot. | é床ã®å€ã¯0ã ãã§ãªã æ£ãšè² äž¡æ¹ã®å¯èœæ§ããããŸã |
The velocity can be zero. It can be negative, or it can be positive. | äœçœ®ã¯åãã£ãŠããã®ã«é床ãäžæãªå Žå㯠|
If initially I know my location, but not my velocity, then I represent it with a Gaussian that's elevated around the correct location, but really, really broad in the space of velocities. | ãã®äœçœ®åšèŸºã«éç©ããããŒã¿ã衚ãã ã¬ãŠã¹ååžã䜿ããŸã é床ã®ç¯å²ãããªãåºãå Žåã§ã äºæž¬ã¹ããããèŠãŠã¿ãŸããã |
Let's look at the prediction step. | ãã®äºæž¬ã¹ãããã§ã¯é床ãåãããªããã äœçœ®ãæšæž¬ããããšãã§ããŸãã |
In the prediction step, I don't know my velocity, so I can't possibly predict for location. I'm going to assume. | ãããé床ãšäœçœ®ã«ã¯è峿·±ãçžé¢æ§ããããŸã |
But miraculously, they'll be some interesting correlation. | ãã®ååžãããã1ç¹ãéžãã§ã¿ãŸããã |
So let's for a second, just pick a point on this distribution over here. | é床ã0ã§ãããšä»®å®ããŸã |
Let me assume my velocity is 0. | çŸå®ã§ã®é床ã¯äžæã§ããããã§ã¯0ãšä»®å®ããŸã |
Of course, in practice, I don't know the velocity, but let me assume for a moment the velocity is 0. | äºæž¬åŸã®çµæã¯ã©ããªãã§ããã |
Where would my posterior be after the prediction? | åºçºç¹ã1ã§ããããšã¯åãã£ãŠããŸã |
Well, we know we started in location 1. | é床ã¯0ãªã®ã§äœçœ®ã¯ãã®ãŸãŸã«ãªãã§ããã |
The velocity is 0, so my location would likely be here. | ã§ã¯é床ã®ä¿¡å¿µãå€ã㊠1ãéžãã§ã¿ãããšã«ããŸã |
Now let's change my belief in velocity and pick a different one. Let's say the velocity is 1. | 1ã¹ãããåŸã®äºæž¬ã¯ã©ãã«ãªãã§ãããã |
Where would my prediction be 1 time step later starting at location 1 and velocity 1? | åºçºç¹ã®äœçœ®ã¯1ã§ é床ã1ãšããå Žåã®äºåŸäºæž¬ãæ±ããŸã ã§ã¯3ã€ã®éžæè¢ãäžããŸã |
I'll give you 3 choices. Here? | ãã®äžããæ£ãããšæããã®ã1ã€éžãã§ãã ãã |
It should print 12, and 3 plus 4 plus 5 with all the spaces. | çããã®äºæ³ãšã¯éããããããŸãã ããã§ã¯äœ¿ã£ãŠããŸããã |
This might have been different from what you expected. We didn't use quotation marks here. | åŒçšç¬Šãã€ãããšããã¹ããæåã©ãã衚瀺ããŸã ããã§ã¯ |
The quotation marks mark literal text. If we use quotes, it means that we want to write 3 plus 4 plus 5 as it is. | 3ïŒ4ïŒ5ããã®ãŸãŸè¡šç€ºãããŸã ã€ããªãå Žåã³ã³ãã¥ãŒã¿ã¯ |
But when we don;t use quotes, the computer reads 3 plus 4 plus 5 as numbers. | 3ïŒ4ïŒ5ãæ°ãšããŠèªã¿åããŸã ã³ã³ãã¥ãŒã¿ã¯è¶³ãç®ã®ããæ¹ãç¥ã£ãŠããã®ã§ |
It knows how to add the numbers, so it added the numbers and then it printed the result as you can see here. | èšç®ããçãã衚瀺ããã®ã§ã ããããã®æ°åã§ã |
You can use system.out.println to print numbers and text | ãã®ããã«æ°ãšããã¹ãã衚瀺ãããã«ã¯ systemïŒoutïŒprintlnã䜿ããŸã |
This is the same problem that we had in the last video. | ãšã³ãžã³ãæåºéã®èŠå¶ãæºãããã©ãã |
So you could ignore the question right here. | ãã®ãã¹ãŠãç¡èŠã§ããŸãã |
You can ignore all of this. | åãããŒã¿ã䜿çšã㊠|
I'm just using that same data to come up with a 95% confidence interval for the actual mean emission for this new engine design. | å®éã®å¹³åæåºã®ïŒïŒïŒ
ã®ä¿¡é Œåºéã æ°ãããšã³ãžã³ã®èšèšã®ããã«æ±ããŸãã ã ããã95% ä¿¡é ŒåºéãèŠã€ãããã§ãã |
So we want to find a 95% confidence interval. | ããŒã¿ã®æ°ã¯ïŒïŒãªã®ã§ã |
And as you could imagine, because we only have 10 samples right here, we're going to want to use a | ããã§ã¯ãTååžã å©çšããŸãã |
T-distribution. | ããã« T 衚ããããŸãã |
And right down here I have a T-table. | 95% ä¿¡é Œåºéãæ±ããŠããŸãã |
And we want a 95% confidence interval. | T å€ã®ç¯å²ã§ãïŒïŒãŒ |
So we want to think about the range of T-values that 95-- or the range that 95% of T-values will fall under. | T å€ã® 95% ã«å
¥ãåãèããŸãã ãã®ããã«èããŸãããã |
So let's think about this way. | æç»ããŸãã |
So let me draw a | ããã« T ååžããããŸãã |
T-distribution right over here. | ã ãã T ååžã¯ãéåžžã« |
So a T-distribution looks very similar to a normal distribution but it has fatter tails. | æ£èŠååžã«äŒŒãŠããŸããã倪ã£ã裟ãæã£ãŠããŸãã ãã®ç«¯ãšãã®ç«¯ããæ£èŠååžãã |
This end and this end will be fatter than in a normal distribution. | 倪ãã§ãã ãããããåºéãèŠã€ããã« |
And then we want to find an interval, so if this is a normalized T-distribution the mean is going to be 0. | ãããæ£èŠåããã T ååžã§ã¯ãå¹³åå€ã¯ 0 ã§ãã ãã®æ£æ°ãšè² æ°ã®éã® T å€ãèŠãŠã |
And we want to find interval of T-values between some negative value here and some positive value here that contains 95% of the probability. | 確çã® 95 ïŒ
ãå«ãŸããŠããåºéã èŠã€ããŸãã ããã 95% ã§ãã |
So this right here has to be 95%. | ãããã®äž¡èŸºã®éèŠãª T å€ãææ¡ããããã« |
And to figure what these critical T-values are at this end and this end, we can just use a T-table. | T 衚ã䜿çšã§ããŸãã äž¡åŽã䜿çšããŸãã |
And we're going to use the two-sided version of this because we're symmetric around the center. | ããã¯ã察称ã§ãã 95 ïŒ
ã®ä¿¡é Œåºéã¯ãäž¡é¢ã«èŠããã |
So you look at the two-sided, we want a 95% confidence interval, so we're going to look right over here, 95% confidence interval. | ããã§ã¯ã95 ïŒ
ä¿¡é Œåºéã¯ããã§ãã 10 ã®ããŒã¿ ãã€ã³ãã§ã¯ã |
We have 10 data points, which means we have 9 degrees of freedom. | 9 èªç±åºŠããããŸãã 10 ã®ããŒã¿ç¹ã§ã¯ 9 èªç±åºŠã§ãã |
So 9 degrees of freedom for our 10 data points. | 10 ãã 1 ãåŒãããã®ã§ãã |
We just took 10 minus 1. | ãããèŠããšã T ååžã§ |
That's what this right here tells us. | äžå¿ãã |
That if you contain all the values that are less than 2.262 away from the center of your T-distribution, you will contain 95% of the probability. | 2.262以å
ã®ãã¹ãŠã®å€ãå«ããš 95% ã®ç¢ºçãå«ã¿ãŸãã T ååžãããã§ãã |
So that is our T-distribution right there. | æç¢ºã«ããŸãã |
Let me make it very clear. | ããã¯ãT ååžã§ãã |
This is our T-distribution. | ããã§ããïŒ ãã®Tååžãã T å€ãã©ã³ãã ã«éžæããå Žå |
So if you randomly pick a T-value from this | 95% ãã£ã³ã¹ã§ |
T-distribution, it has a 95% chance of being within this far from the mean. | ãã®äžå¿ããã®åºéã«å«ãŸããå¯èœæ§ããããŸãã æžãæãããšã |
Or maybe we should write this way. | ã©ã³ãã 㪠T å€ãéžã¶å Žåã« |
If I pick a random T-value, if I take a random T-statistic-- | 95 ïŒ
ã®ç¢ºçã§ |
let me write it this way-- there's a 95% chance that a random T-statistic is going to be less than 2.262, and greater than negative 2.262. | ã©ã³ãã ã® T çµ±èšã¯ã 2.262ããå°ãªã ㌠2.262 ãã倧ãããªããŸãã 95% ã®ãã£ã³ã¹ã |
95% percent chance. | ãã®ãµã³ãã«ã§ãã©ã³ãã Tçµ±èšã |
Now when we took this sample, we could also derive a random | å°ãããšãã§ããŸãã |
T-statistic from this. | ãã®ãµã³ãã«ã®å¹³åãšãæšæ¬ã®æšæºåå·®ããããŸãã |
We have our sample mean and our sample standard deviation, our sample mean here is 17.17-- figured that out in the last video, just add these up, divide by 10-- and our sample standard deviation here is 2.98. | ãã®ãµã³ãã«ã®å¹³å㯠17.17ã§ãããã¯å
ã®ãããªã§åŸãããŸããã ããããå ç®ããïŒïŒã§å²ãã |
So the T-statistic that we can derive from this information right over here-- so let me write it over here-- the | ããã«æžããŸãã T çµ±èšãããããå°åºããããšãã§ã |
T-statistic that we could derive from this, and you can view this T-statistic as being a random sample from a | ã€ãŸãããã®T çµ±èšå€ã¯ãTååžã®ã©ã³ãã ãµã³ãã«ãš èŠãããšãã§ããŸãã |
T-distribution. | 9 èªç±åºŠã® T ååžã§ãã |
A T-distribution with 9 degrees of freedom. | ããããT çµ±èšãå°åºããããšãã§ã |
So the T-statistic that we could derive from that is going to be our mean, 17.17 minus the true mean of our population. | ããããå¹³åã® 17.17 ãã å®ã®å¹³åãåŒããå€ã§ãã å®éããµã³ãã«ã®ååžã®çã®å¹³åå€ã |
We've seen this multiple times. | ããããT çµ±èšã§ãã |
This right here is the T-statistic. | ãã®ãµã³ãã«ãåãããšã§ã |
So by taking this sample you can say that we've randomly sampled a T-statistic from this 9 degree of freedom | 9 èªç±åºŠã® T ååžããã ã©ã³ãã ã«ãµã³ãã«ãåŸããšèšããŸãã |
T-distribution. | ã ããã 95% ãã£ã³ã¹ã§ |
So there's a 95% chance that this thing right over here is going to be between-- is going to be less than 2.262 and greater than negative 2.262. | 2.262㚠㌠2.262 ã®éã«ããããŸãã ã ããã95% ã®ç¢ºçã¯ãŸã ããã«é©çšãããŸãã |
So the 95% probability still applies to this right here. | ãããã®äºãèšç®ããå¿
èŠããããŸãã |
Now we just have to do some math, calculate these things. | é»åã䜿çšããŸãã |
So let me get my calculator out. | ããã§ããïŒ ãããèšç®ãããš |
And so let me just calculate this denominator right over here. | ããã§åæ¯ã¯ããã§ãã 10 ã®å¹³æ¹æ ¹ã§ 2.98 ãå²ããŸãã |
So we have 2.98 divided by the square root of 10. | 0.9423 ã§ãã |
So that's 0.9423. | ãã® äž¡åŽã« |
So what I'm going to do is I'm going to multiply both sides of this equation by this expression right over here. | ãããæããŸãã ããããããšã§ã |
So if I do that-- so let me just do that right over-- so if I multiply this entire-- this is really two equations or two inequalities I should say. | ãã®å
šäœãä¹ç®ã - - ãããæ¬åœã¯ 2 ã€ã®æ¹çšåŒ ãŸã㯠2 ã€ã®äžå¹³çåŒãšèšããŸãã ãã®æ°ããã®æ°ãã倧ããã |
That this quantity is greater than this quantity and that this quantity's greater than that quantity. | ãã®æ°ããã®æ°ããã倧ããã§ãã ããããããããã¹ãŠãåæã«æäœã§ã |
But we can operate on all of them at the same time, this entire inequality. | ãã®å
šäœã®äžå¹³çåŒã§ãã ã ããããã®å
šäœã® |
So what we want to do is multiply this entire inequality by this value right over here. | äžå¹³çåŒããã®å€ã§ä¹ç®ããŸãã ãã®å€ã§èšç®ã㊠|
And we just calculated it at that value-- let me write it over here-- that 2.98-- I'll write it right over here-- 2.98 over the square root of 10 is equal to 0.942. | 2.98 ãããã«æžããŸãã 10 ã®å¹³æ¹æ ¹ã§ 2.98ãå²ããš 0.942 ã«çããã§ãã å
šäœã®äžå¹³çã0.942ã§ ä¹ç®ã |
So we're just going to be less than 17.17 minus our population mean, which is going to be less than 2.262 times, once again, 0.942. | ããã¯ã 2.262 ããå°ããã§ãã ããäžåºŠ 0.942 ãæããŸãã äžã«éããŸãããã |
Let me scroll over to the right a little bit. | 0.942ã§ãã |
0.942. | ãã®äžçåŒã®ãã¹ãŠã® 3 ã€ã®åŽããã®æ°ã§ |
Just be clear, I'm just multiplying all three sides of this inequality by this number right over here. | ä¹ç®ããŠããŸãã ãããããã£ã³ã»ã«ãããŸãã |
In the middle this cancels out. | ããã«æžããŸãã 0.942ã |
So if I multiply-- I'll just write it over here-- 0.942, 0.942, 0.942. | 0.942ã0.942ã ãããšããã¯åãæ°ã§ |
This and this is the same number so that's why those cancel out. | ãã£ã³ã»ã«ããŸãã é»åã« |
And now let's get the calculator to figure out what these numbers are. | ãããã®æ°åã¯å
¥ããŸãã ã ããã0.942 x 2.262 㯠|
So if we have the 0.942 times 2.262. | 2.13 ã§ãã |
So we're going to say times 2.262 is 2.13. | ããã¯ã |
So this number right over here on the right-hand side is 2.13. | å³åŽã 2.13 ã§ãã ãã®å·ŠåŽã®æ°ã¯ãã¡ããã©ãã®è² æ°ã§ãã |
This number on the left is just the negative of that. | ãŒ2.13 ã§ãã |
So it's negative 2.13. | ãŸã ãäžçåŒã§ãã |
End of preview. Expand in Data Studio
README.md exists but content is empty.
- Downloads last month
- 18