概述
請(qǐng)注意我們本來(lái)要找的是什么,我們要找的是特定樣本在樣本均值分布的什么位置,不僅僅針對(duì)是這個(gè)簡(jiǎn)單的總體更是針對(duì)龐大的總體。
現(xiàn)在可以找到了因?yàn)楝F(xiàn)在我們知道對(duì)于均值分布,其中每個(gè)均值都是樣本量為 n 的均值闪幽,該分布的標(biāo)準(zhǔn)偏差就等于總體標(biāo)準(zhǔn)偏差除以平方根 n,這就叫做中心極限定理涡匀。
它不僅適用于這些簡(jiǎn)單的總體盯腌,更是適用于任何總體。正是因?yàn)橹行臉O限定理陨瘩,我們的總體可以是任何形狀腕够。
假設(shè)我們從中抽取一個(gè)樣本并計(jì)算出均值,然后再抽取出一個(gè)樣本并計(jì)算出均值舌劳,持續(xù)這么操作帚湘。
如果畫出均值分布圖的話,形狀會(huì)是相對(duì)正態(tài)的甚淡,其中標(biāo)準(zhǔn)偏差等于總體標(biāo)準(zhǔn)偏差除以樣本量的平方根我們一直都叫它 SE
02-Video: Descriptive vs. Inferential Statistics
In this section, we learned about how Inferential Statistics differs from Descriptive Statistics.
Descriptive Statistics
Descriptive statistics
is about describing our collected data.
Inferential Statistics
Inferential Statistics
is about using our collected data to draw conclusions to a larger population.
We looked at specific examples that allowed us to identify the
- Population - our entire group of interest.
- Parameter - numeric summary about a population
- Sample - subset of the population
- Statistic numeric summary about a sample
05-Text: Descriptive vs. Inferential Statistics\
Descriptive vs. Inferential Statistics
In this section, we learned about how Inferential Statistics differs from Descriptive Statistics.
Descriptive Statistics
Descriptive statistics
is about describing our collected data using the measures discussed throughout this lesson: measures of center, measures of spread, shape of our distribution, and outliers. We can also use plots of our data to gain a better understanding.
Inferential Statistics
Inferential Statistics
is about using our collected data to draw conclusions to a larger population. Performing inferential statistics well requires that we take a sample that accurately represents our population of interest.
A common way to collect data is via a survey. However, surveys may be extremely biased depending on the types of questions that are asked, and the way the questions are asked. This is a topic you should think about when tackling the the first project.
We looked at specific examples that allowed us to identify the
- Population - our entire group of interest.
- Parameter - numeric summary about a population
- Sample - subset of the population
- Statistic numeric summary about a sample
10-Text: Sampling Distribution Notes
Sampling Distributions Notes(抽樣分布時(shí)統(tǒng)計(jì)值的分布)
We have already learned some really valuable ideas about sampling distributions:
First, we have defined sampling distributions as the distribution of a statistic.
This is fundamental - I cannot stress the importance of this idea. We simulated the creation of sampling distributions in the previous ipython notebook for samples of size 5 and size 20, which is something you will do more than once in the upcoming concepts and lessons.
選擇不同的組合統(tǒng)計(jì)量會(huì)不相同
如果選擇所有的組合將會(huì)出現(xiàn)下面的結(jié)果
如果將不同的組合產(chǎn)生的統(tǒng)計(jì)量進(jìn)行繪圖可得
以上的分布就為抽樣分布
Second, we found out some interesting ideas about sampling distributions that will be iterated later in this lesson as well. We found that for proportions (and also means, as proportions are just the mean of 1 and 0 values), the following characteristics hold.
The sampling distribution is centered on the original parameter value.
The sampling distribution decreases its variance depending on the sample size used. Specifically, the variance of the sampling distribution is equal to the variance of the original data divided by the sample size used(抽樣分布的方差等于原始數(shù)據(jù)的方差除以樣本量). This is always true for the variance of a sample mean!
樣本均值的抽樣分布圖, 其方差為σ平方(原始數(shù)據(jù)的)除以樣本量
練習(xí)
Looking Ahead
The rest of this lesson will reinforce some of these ideas that you saw at work in this notebook, but you are already being introduced to some big ideas that will continue to show up again and again.
12-Video: Notation for Parameters vs. Statistics
As you saw in this video, we commonly use Greek symbols as parameters and lowercase letters as the corresponding statistics. Sometimes in the literature, you might also see the same Greek symbols with a "hat" to represent that this is an estimate of the corresponding parameter.
Below is a table that provides some of the most common parameters and corresponding statistics, as shown in the video.
Remember that all parameters pertain to a population, while all statistics pertain to a sample.
注意
總體參數(shù)不會(huì)因樣本的不同發(fā)生變化, 只有統(tǒng)計(jì)量會(huì)因樣本的不同而不同.
15-Video: Two Useful Theorems - Law of Large Numbers
Two important mathematical theorems for working with sampling distributions include:
- Law of Large Numbers(大數(shù)定理)
- Central Limit Theorem(中心極限定理)
The Law of Large Numbers says that as our sample size increases, the sample mean gets closer to the population mean, but how did we determine that the sample mean would estimate a population mean in the first place? How would we identify another relationship between parameter and statistic like this in the future?
Three of the most common ways are with the following estimation techniques:
Though these are beyond the scope of what is covered in this course, these are techniques that should be well understood for Data Scientist's that may need to understand how to estimate some value that isn't as common as a mean or variance. Using one of these methods to determine a "best estimate", would be a necessity.
17-Video: Two Useful Theorems - Central Limit Theorem
The Central Limit Theorem states that with a large enough sample size the sampling distribution of the mean will be normally distributed.
The Central Limit Theorem actually applies for these well known statistics:
And it applies for additional statistics, but it doesn't apply for all statistics! . You will see more on this towards the end of this lesson.
20-Video: When Does the Central Limit Theorem Not Work?
In the previous example, you saw how the Central Limit Theorem applies to the sample mean of 100 draws from a right-skewed distribution. However, it did not apply to a sample size of 3 draws from this same distribution.(并不適用所有的抽樣分布)
適用于:
不適用于:
In the next concepts, you will see that the with large sample sizes the sampling distribution of certain statistics will never become normally distributed. So how do we know which statistics will follow normal distributions, and which will not?
So, you might be wondering already why is the Central Limit Theorem such a big deal? In our new age of computers, it probably isn't as big of a deal, but more on this coming up soon!
22-Video: Bootstrapping(自助法)
Bootstrapping is sampling with replacement.(已放回方式進(jìn)行抽樣, 也就是說(shuō)被抽取的個(gè)體有可能在下一次接著被抽到, 也有可能被一直抽到, 但是這個(gè)可能性非常小)Using random.choice in python actually samples in this way. Where the probability of any number in our set stays the same regardless of how many times it has been chosen. Flipping a coin and rolling a die are kind of like bootstrap sampling as well, as rolling a 6 in one scenario doesn't mean that 6 is less likely later.
23-Video: Bootstrapping & The Central Limit Theorem
在推論統(tǒng)計(jì)學(xué)中, 使用統(tǒng)計(jì)量去推斷總體參數(shù), 假設(shè)我們讓樣本當(dāng)作一個(gè)總體, 上圖中的21個(gè)杯子, 雖然只有總體的一個(gè)樣本, 但是假設(shè)它們是總體, 可以從中對(duì)其進(jìn)行自助抽樣, 在一個(gè)樣本和另一個(gè)樣本之間, 喝咖啡的人之間比例有什么變化.
從上圖中可以看出, 兩次的均值不同, 因?yàn)榈诙坞m然還是21個(gè)樣本數(shù), 但是每一個(gè)個(gè)體都是從新從原始的21個(gè)個(gè)體中抽取.
You actually have been bootstrapping to create sampling distributions in earlier parts of this lesson, but this can be extended to a bigger idea.
It turns out, we can do a pretty good job of finding out where a parameter is by using a sampling distribution created from bootstrapping from only a sample. This will be covered in depth in the next lessons.
Three of the most common ways are with the following estimation techniques for finding "good statistics" are as shown previously:
Though these are beyond the scope of what is covered in this course, these are techniques that should be well understood for data scientists who may need to understand how to estimate some value that isn't as common as a mean or variance. Using one of these methods to determine a "best estimate" would be a necessity.
25-Video: The Background of Bootstrapping
Two helpful links:
You can learn more about Bradley Efron here.
Additional notes on why bootstrapping works as a technique for inference can be found here.
26-Video: Why are Sampling Distributions Important
27-Quiz + Text: Recap & Next Steps
Recap
In this lesson, you have learned a ton! You learned:
Sampling Distributions
Sampling Distributions are the distribution of a statistic (any statistic).
There are two very important mathematical theorems that are related to sampling distributions: The Law of Large Numbers and The Central Limit Theorem.
The Law of Large Numbers states that as a sample size increases, the sample mean will get closer to the population mean. In general, if our statistic is a "good" estimate of a parameter, it will approach our parameter with larger sample sizes.
The Central Limit Theorem states that with large enough sample sizes our sample mean will follow a normal distribution, but it turns out this is true for more than just the sample mean.
Bootstrapping
Bootstrapping is a technique where we sample from a group with replacement.
We can use bootstrapping to simulate the creation of sampling distribution, which you did many times in this lesson.
By bootstrapping and then calculating repeated values of our statistics, we can gain an understanding of the sampling distribution of our statistics.
Looking Ahead
In this lesson you gained the fundamental ideas that will help you with the next two lessons by learning about sampling distributions and bootstrapping. These are going provide the basis for confidence intervals and hypothesis testing in the next two lessons.