- 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:

- Test-Driven Development with Mockito
- 使用GitOps實現Kubernetes的持續部署:模式、流程及工具
- InfluxDB原理與實戰
- Python金融大數據分析(第2版)
- 商業分析思維與實踐:用數據分析解決商業問題
- 數據結構與算法(C語言版)
- 軟件成本度量國家標準實施指南:理論、方法與實踐
- 大話Oracle Grid:云時代的RAC
- 新基建:數據中心創新之路
- INSTANT Android Fragmentation Management How-to
- Hadoop集群與安全
- 深入理解InfluxDB:時序數據庫詳解與實踐
- 算力經濟:從超級計算到云計算
- Access 2016數據庫應用基礎
- 數據中臺實戰:手把手教你搭建數據中臺