官术网_书友最值得收藏!

Sampling with or without replacement

Let's now assume that there is a total of n items in the bucket and we must pick r of them. Then, let = {1, 2,…, r} be the list of items picked and let = {1, 2, …, n} be the total number of items. This can be written as a function, as follows:

Here, f(i) is the ith item.

Sampling with replacement is when we pick an item at random and then put it back so that the item can be picked again. 

However, sampling without replacement refers to when we choose an item and don't put it back, so we cannot pick it again. Let's see an example of both.

Say we need to open the door to our office and we have a bag containing n keys; they all look identical, so there's no way of differentiating between them. 

The first time we try picking a key, we replace each one after trying it, and we manage to find the correct key on the rth trial, implying we got it wrong r-1 times. The probability is then as follows:

Now, we know that our earlier strategy wasn't the smartest, so this time we try it again but without replacement and eliminate each key that doesn't work. Now, the probability is as follows:

主站蜘蛛池模板: 阿荣旗| 石楼县| 航空| 临桂县| 吉林市| 平顶山市| 于田县| 安平县| 哈尔滨市| 会同县| 雷山县| 当阳市| 金堂县| 丁青县| 手机| 黔西县| 谢通门县| 徐州市| 会昌县| 临颍县| 兰西县| 梨树县| 汉中市| 壤塘县| 上饶市| 平顺县| 赤壁市| 桦南县| 邢台市| 炎陵县| 沁水县| 晴隆县| 靖西县| 柳河县| 陆川县| 泾川县| 铜山县| 峨眉山市| 兴山县| 冕宁县| 历史|