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%の信頼区間を 新しいエンジンの設計のために求めます。 だから、95% 信頼区間を見つけたいです。
|
So we want to find a 95% confidence interval.
|
データの数は10なので、
|
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 値の範囲で、95ー
|
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で、これは先のビデオで得られました。 これらを加算し、10で割り、
|
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
- 8