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

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:

主站蜘蛛池模板: 朝阳市| 金昌市| 菏泽市| 盐边县| 开原市| 林甸县| 九江县| 浑源县| 萨迦县| 湛江市| 河北省| 台北县| 新巴尔虎右旗| 怀化市| 行唐县| 石门县| 曲阳县| 惠水县| 申扎县| 星座| 荥阳市| 阿拉善盟| 桂东县| 同德县| 木里| 婺源县| 鸡西市| 博爱县| 博爱县| 茌平县| 巴南区| 娄底市| 长垣县| 郯城县| 黄冈市| 简阳市| 奎屯市| 卓资县| 石嘴山市| 阿坝| 兴仁县|