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

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:

主站蜘蛛池模板: 玉树县| 昭觉县| 盐源县| 南陵县| 吕梁市| 定日县| 平武县| 嵊泗县| 南华县| 南溪县| 汾西县| 江达县| 常宁市| 应用必备| 湖北省| 射阳县| 丁青县| 兴城市| 盐津县| 浮山县| 丽水市| 辉县市| 嘉峪关市| 乌拉特中旗| 佛冈县| 涪陵区| 眉山市| 柏乡县| 永新县| 西和县| 萨迦县| 盐边县| 呼图壁县| 大厂| 洪雅县| 河源市| 绵竹市| 石首市| 调兵山市| 壶关县| 大理市|