内容大纲
![de427892e9cea06bd4a5480f3070fad4.png](https://img-blog.csdnimg.cn/img_convert/de427892e9cea06bd4a5480f3070fad4.png)
总体与样本
![b21b53719545acfbe3deddea52a74ca1.png](https://img-blog.csdnimg.cn/img_convert/b21b53719545acfbe3deddea52a74ca1.png)
总体中抽取样本的代码简单演示:
随机数random模块
随机数random模块使用教程:http://www.runoob.com/python3/python3-random-number.html
# 导入random
抽奖过程模拟
range() 函数可创建一个整数列表,一般用在 for 循环中。
使用语法:
range(start, stop[, step])
参数说明:
start: 计数从 start 开始。默认是从 0 开始。例如range(5)等价于range(0, 5)
start: 计数从 start 开始,但不包括 stop。例如:range(0, 5) 是[0, 1, 2, 3, 4]没有5
step:步长,默认为1。例如:range(0, 5) 等价于 range(0, 5, 1)
#抽奖:生成多个随机数
pandas数据框(DataFrame)的抽样方法
# 导入包
![f53d371bf345bdf8bb4778724dbf4a53.png](https://img-blog.csdnimg.cn/img_convert/f53d371bf345bdf8bb4778724dbf4a53.png)
#随机选择选n行数据,成为一个子集。
![6020873704a4eb281c4c04fd7fa3cda8.png](https://img-blog.csdnimg.cn/img_convert/6020873704a4eb281c4c04fd7fa3cda8.png)
中心极限定理
![13ea1a4adf22956281322d76fa23dea9.png](https://img-blog.csdnimg.cn/img_convert/13ea1a4adf22956281322d76fa23dea9.png)
理解中心极限定理小游戏:(Sampling Distributions)
![e125d5c04eebcb9a2edfdbb718d9d8f8.png](https://img-blog.csdnimg.cn/img_convert/e125d5c04eebcb9a2edfdbb718d9d8f8.png)
如何用样本估计总体
![d196797853aa4d45ca9b506c18e47304.png](https://img-blog.csdnimg.cn/img_convert/d196797853aa4d45ca9b506c18e47304.png)
![7ee18e0b826d876b37ac77406ba16761.png](https://img-blog.csdnimg.cn/img_convert/7ee18e0b826d876b37ac77406ba16761.png)
如何避免偏见
![c3f74d9e0bed8f6101afa243d2d3d67d.png](https://img-blog.csdnimg.cn/img_convert/c3f74d9e0bed8f6101afa243d2d3d67d.png)
![f9d2905a1509d6b73f75d768b0995161.png](https://img-blog.csdnimg.cn/img_convert/f9d2905a1509d6b73f75d768b0995161.png)
![b6477bfac330cd063d5f60c70c26600f.png](https://img-blog.csdnimg.cn/img_convert/b6477bfac330cd063d5f60c70c26600f.png)
![6f97ff7aa37be270cf1122d1a51cc3d0.png](https://img-blog.csdnimg.cn/img_convert/6f97ff7aa37be270cf1122d1a51cc3d0.png)
![3659348404cfc0d69bb81663ca824baa.png](https://img-blog.csdnimg.cn/img_convert/3659348404cfc0d69bb81663ca824baa.png)
![cee43eb1c2c17889e1f193e8a7c7c236.png](https://img-blog.csdnimg.cn/img_convert/cee43eb1c2c17889e1f193e8a7c7c236.png)
![0179c70d2832c38590571b0fdd08e7ca.png](https://img-blog.csdnimg.cn/img_convert/0179c70d2832c38590571b0fdd08e7ca.png)
![3a38495e2ad6e0c546e1a25d5f460a98.png](https://img-blog.csdnimg.cn/img_convert/3a38495e2ad6e0c546e1a25d5f460a98.png)
![2e29c20efdaa79ae4d26c7a42935bae5.png](https://img-blog.csdnimg.cn/img_convert/2e29c20efdaa79ae4d26c7a42935bae5.png)