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

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:

主站蜘蛛池模板: 乌兰浩特市| 永仁县| 新津县| 秀山| 神木县| 盐池县| 高密市| 建宁县| 邢台县| 独山县| 荆门市| 大厂| 宜丰县| 山阳县| 城市| 上虞市| 凯里市| 五大连池市| 开远市| 北川| 怀来县| 浦城县| 沂水县| 连州市| 崇阳县| 江陵县| 高要市| 鹤山市| 怀化市| 凤阳县| 庆云县| 横峰县| 蒙山县| 金乡县| 平和县| 海安县| 井陉县| 泸定县| 舞阳县| 绍兴市| 赤峰市|