- Hands-On Mathematics for Deep Learning
- Jay Dawani
- 242字
- 2021-06-18 18:55:22
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 R = {1, 2,…, r} be the list of items picked and let N = {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:

- Building Computer Vision Projects with OpenCV 4 and C++
- 數據庫應用實戰
- 云數據中心基礎
- SQL Server 2012數據庫技術與應用(微課版)
- Python金融大數據分析(第2版)
- Effective Amazon Machine Learning
- 大數據:規劃、實施、運維
- 醫療大數據挖掘與可視化
- 算法與數據中臺:基于Google、Facebook與微博實踐
- 圖數據實戰:用圖思維和圖技術解決復雜問題
- 高維數據分析預處理技術
- MySQL數據庫技術與應用
- Unity 2018 By Example(Second Edition)
- Oracle高性能SQL引擎剖析:SQL優化與調優機制詳解
- 云原生架構:從技術演進到最佳實踐