-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.xml
More file actions
219 lines (208 loc) · 22.4 KB
/
index.xml
File metadata and controls
219 lines (208 loc) · 22.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>Probability Space</title>
<link>https://alanthink.github.io/blog/</link>
<description>Recent content on Probability Space</description>
<generator>Hugo -- gohugo.io</generator>
<language>en</language>
<copyright>©2020 Alanthink.</copyright>
<lastBuildDate>Sat, 09 Jun 2018 00:00:00 +0000</lastBuildDate>
<atom:link href="https://alanthink.github.io/blog/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>Multiplicative Chernoff v.s. Additive Chernoff: Which One Is Stronger?</title>
<link>https://alanthink.github.io/blog/posts/2018-06-09-multiplicative-vs-additive/</link>
<pubDate>Sat, 09 Jun 2018 00:00:00 +0000</pubDate>
<guid>https://alanthink.github.io/blog/posts/2018-06-09-multiplicative-vs-additive/</guid>
<description><p>Let me first show their definitions from Wikipedia <sup id="fnref:1"><a href="#fn:1" class="footnote-ref" role="doc-noteref">1</a></sup>. Note that the domain of random variables can be extended from $\{ 0, 1 \}$ to $[0, 1]$ just noting that $\E \left[ e^{tX_i} \right] \leq \E[X_i] \cdot e^t + (1 - \E[X_i])$.</p>
<h3 id="additive-chernoff-bound">Additive Chernoff bound</h3>
<p>Suppose $X_1, \dots, X_n$ are <em>i.i.d.</em> random variables supported on $[0, 1]$. Let $\E[X_i] = \mu$ and $\bar{X} = \frac{1}{n} \sum_{i = 1}^n X_i$. Then, we have</p>
<p>$$
\Pr\left( \bar{X} &gt; \mu + \eps \right) \leq \left( \left( \frac{\mu}{\mu + \eps} \right)^{\mu + \eps} \cdot \left( \frac{1 - \mu}{1 - \mu - \eps} \right)^{1 - \mu - \eps} \right)^n,
$$</p>
<p>and</p>
<p>$$
\Pr\left( \bar{X} &lt; \mu - \eps \right) \leq \left( \left( \frac{\mu}{\mu - \eps} \right)^{\mu - \eps} \cdot \left( \frac{1 - \mu}{1 - \mu + \eps} \right)^{1 - \mu + \eps} \right)^n.
$$</p>
<h3 id="multiplicative-chernoff-bound">Multiplicative Chernoff Bound</h3>
<p>Suppose $X_1, \dots, X_n$ are <em>i.i.d.</em> random variables supported on $[0, 1]$. Let $\E[X_i] = \mu$ and $\bar{X} = \frac{1}{n} \sum_{i = 1}^n X_i$. Then, we have</p>
<p>$$
\Pr\left( \bar{X} &gt; (1 + \delta)\mu \right) \leq \left( \frac{e^{\delta}}{ (1 + \delta)^{(1 + \delta)} } \right)^{n \mu},
$$</p>
<p>and</p>
<p>$$
\Pr\left( \bar{X} &lt; (1 - \delta)\mu \right) \leq \left( \frac{e^{-\delta}}{ (1 - \delta)^{(1 - \delta)} } \right)^{n \mu}.
$$</p>
<p>If you check their proofs in wikipedia, you will find that multiplicative Chernoff uses one more relaxation by $1 + x \leq e^x$. So technically additive chernoff bound is stronger than multiplicative chernoff bound which means I agree with the second answer in <sup id="fnref:2"><a href="#fn:2" class="footnote-ref" role="doc-noteref">2</a></sup>.</p>
<p>However, in practice, usuallly we are not referring to this version of additive chernoff bound when we are talking about additive chernoff bound. A more often way to bound $\Pr\left( \bar{X} &gt; \mu + \eps \right)$ is as the following:</p>
<p>\begin{align*}
\Pr\left( \bar{X} &gt; \mu + \eps \right) &amp; \leq \frac{ \E[\exp(t (X_i - \mu) )] }{ \exp(t n \eps) } \\
&amp; = \frac{ \prod_{i = 1}^n \E[ \exp(t (X_i - \mu) )] }{ \exp(tn \eps) } \\
&amp; \leq \exp( n(t^2/8 - t\eps ) ) ,
\end{align*}</p>
<p>where the last but second inequality is due to Hoeffding&rsquo;s lemma. By letting $t = 4\eps$, we get</p>
<p>$$
\Pr\left( \bar{X} &gt; \mu + \eps \right) \leq e^{ -2 n \eps^2 }.
$$</p>
<p>This is a weaker additive chernoff bound partly due to Hoeffding&rsquo;s lemma holds for any domain with length at most 1. So it does not make most use of domain $[0, 1]$. And if you are referring to this version of additive chernoff bound, then it is weaker than the multiplicative chernoff bound. This phenomenon can be observed when $\mu \ll 1$.</p>
<div class="footnotes" role="doc-endnotes">
<hr>
<ol>
<li id="fn:1">
<p><a href="https://en.wikipedia.org/wiki/Chernoff_bound#cite_note-1"target="_blank" rel="noopener noreferrer">Chernoff bound</a>, Wikipedia.&#160;<a href="#fnref:1" class="footnote-backref" role="doc-backlink">&#x21a9;&#xfe0e;</a></p>
</li>
<li id="fn:2">
<p><a href="https://math.stackexchange.com/questions/283487/is-the-multiplicative-chernoff-bound-stronger-than-additive-one"target="_blank" rel="noopener noreferrer">StackExchange</a>.&#160;<a href="#fnref:2" class="footnote-backref" role="doc-backlink">&#x21a9;&#xfe0e;</a></p>
</li>
</ol>
</div>
</description>
</item>
<item>
<title>Generate New Posts by Shell Scripts</title>
<link>https://alanthink.github.io/blog/posts/2018-03-27-generate-new-posts-by-shell-scripts/</link>
<pubDate>Tue, 27 Mar 2018 00:00:00 +0000</pubDate>
<guid>https://alanthink.github.io/blog/posts/2018-03-27-generate-new-posts-by-shell-scripts/</guid>
<description><p>This is the shell script I use to create a new post.</p>
<p>The script is modified from <a href="https://gist.github.com/aamnah/f89fca7906f66f6f6a12"target="_blank" rel="noopener noreferrer">@AamnahAkram</a>. For more functions, you are suggested to visit the link.</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="cp">#!/bin/bash
</span></span></span><span class="line"><span class="cl"><span class="c1"># About: Bash script to create new Jekyll posts</span>
</span></span><span class="line"><span class="cl"><span class="c1"># Author: @AamnahAkram</span>
</span></span><span class="line"><span class="cl"><span class="c1"># URL: https://gist.github.com/aamnah/f89fca7906f66f6f6a12</span>
</span></span><span class="line"><span class="cl"><span class="c1"># Description: This is a very basic version of the script</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c1"># VARIABLES</span>
</span></span><span class="line"><span class="cl"><span class="c1">######################################################</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c1"># Define the post directory (where to create the file)</span>
</span></span><span class="line"><span class="cl"><span class="nv">HUGO_POSTS_DIR</span><span class="o">=</span><span class="s1">&#39;content/posts/&#39;</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c1"># Post title</span>
</span></span><span class="line"><span class="cl"><span class="nv">TITLE</span><span class="o">=</span><span class="s1">&#39;&#39;</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="k">for</span> var in <span class="s2">&#34;</span><span class="nv">$@</span><span class="s2">&#34;</span>
</span></span><span class="line"><span class="cl"><span class="k">do</span>
</span></span><span class="line"><span class="cl"> <span class="nv">TITLE</span><span class="o">=</span><span class="nv">$TITLE</span><span class="s2">&#34; </span><span class="nv">$var</span><span class="s2">&#34;</span>
</span></span><span class="line"><span class="cl"><span class="k">done</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c1"># Replace spaces in title with hyphen</span>
</span></span><span class="line"><span class="cl"><span class="nv">TITLE_STRIPPED</span><span class="o">=</span><span class="si">${</span><span class="nv">TITLE</span><span class="p">// /-</span><span class="si">}</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c1"># Date</span>
</span></span><span class="line"><span class="cl"><span class="nv">DATE</span><span class="o">=</span><span class="sb">`</span>date +%Y-%m-%d<span class="sb">`</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c1"># Post Type (markdown, md, textile)</span>
</span></span><span class="line"><span class="cl"><span class="nv">TYPE</span><span class="o">=</span><span class="s1">&#39;.md&#39;</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c1"># File name structure</span>
</span></span><span class="line"><span class="cl"><span class="nv">FILENAME</span><span class="o">=</span><span class="si">${</span><span class="nv">DATE</span><span class="si">}${</span><span class="nv">TITLE_STRIPPED</span><span class="si">}${</span><span class="nv">TYPE</span><span class="si">}</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c1"># COMMANDS</span>
</span></span><span class="line"><span class="cl"><span class="c1">#######################################################</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c1"># go to post directory</span>
</span></span><span class="line"><span class="cl"><span class="nb">cd</span> <span class="si">${</span><span class="nv">HUGO_POSTS_DIR</span><span class="si">}</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c1"># make a new post file</span>
</span></span><span class="line"><span class="cl">touch <span class="si">${</span><span class="nv">FILENAME</span><span class="si">}</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c1"># add YAML front matter and trim leading blank line</span>
</span></span><span class="line"><span class="cl"><span class="nb">echo</span> -e <span class="s2">&#34;
</span></span></span><span class="line"><span class="cl"><span class="s2">---
</span></span></span><span class="line"><span class="cl"><span class="s2">date: </span><span class="si">${</span><span class="nv">DATE</span><span class="si">}</span><span class="s2">
</span></span></span><span class="line"><span class="cl"><span class="s2">title: </span><span class="si">${</span><span class="nv">TITLE</span><span class="si">}</span><span class="s2">
</span></span></span><span class="line"><span class="cl"><span class="s2">categories:
</span></span></span><span class="line"><span class="cl"><span class="s2"> -
</span></span></span><span class="line"><span class="cl"><span class="s2">tags:
</span></span></span><span class="line"><span class="cl"><span class="s2"> -
</span></span></span><span class="line"><span class="cl"><span class="s2">---
</span></span></span><span class="line"><span class="cl"><span class="s2">&#34;</span> <span class="p">|</span> sed <span class="s1">&#39;/./,$!d&#39;</span> &gt; <span class="si">${</span><span class="nv">FILENAME</span><span class="si">}</span>
</span></span></code></pre></div></description>
</item>
<item>
<title>An Application of Doob's Martingale Inequality</title>
<link>https://alanthink.github.io/blog/posts/2018-03-23-doob-inequality/</link>
<pubDate>Fri, 23 Mar 2018 00:00:00 +0000</pubDate>
<guid>https://alanthink.github.io/blog/posts/2018-03-23-doob-inequality/</guid>
<description><h2 id="problem">Problem</h2>
<p>Suppose we have a sequence of <em>i.i.d.</em> Gaussian random variables $X_t$&rsquo;s with bounded variance. Let $S_n = \sum_{t = 1}^n X_t$. How can we bound the probability of</p>
<p>\begin{equation} \label{eq:problem}
\left \{ \max_{1 \leq t \leq n} S_t &gt; \eps \right \}?
\end{equation}</p>
<h2 id="sub-gaussian-random-variables">Sub-gaussian random variables</h2>
<p>To make this problem more realistic, it is always safe to loose Gaussian random variables to zero mean <em>sub-gaussian</em> random variables.</p>
<p>Intuitively, sub-gaussian r.v.&rsquo;s have tails decreasing as fast as those of Gaussian r.v.&rsquo;s. Hence, most of the inequalities related to Gaussian r.v.&rsquo;s can be safely applied to sub-gaussians without any modifications! You are suggested to refer to <a href="http://www.stat.cmu.edu/~arinaldo/36788/subgaussians.pdf"target="_blank" rel="noopener noreferrer">Subgaussian random variables: An expository note</a> for more details. Here, we assume $X_t$ is a $\sigma$-subgaussian r.v. which is comparable to a Gaussian r.v. with variance $\sigma^2$.</p>
<p>An elementary property of $\sigma$-subgaussian random variable $X$ is</p>
<p>\begin{equation} \label{eq:ele-prop-subgaussian}
\E[ \exp( \lambda X ) ] \leq \exp( \lambda^2 \sigma^2 / 2 ).
\end{equation}</p>
<p>Also, it is useful to know the following facts:</p>
<ul>
<li>$S_t$ is $\sqrt{t} \sigma$-subgaussian,</li>
<li>and $\Pr( X &gt; \eps ) \leq \exp\left( - \frac{ \eps^2 }{2\sigma^2} \right)$.</li>
</ul>
<h2 id="a-naive-way">A naive way</h2>
<p>Obviously, we can use a union bound to give a naive bound.</p>
<p>For each $t$, since $S_t$ is $\sqrt{t} \sigma$-subgaussian we have $\Pr( S_t &gt; \eps ) \leq \exp\left( - \frac{\eps^2}{2 t \sigma^2} \right)$. Via a union bound, we get</p>
<p>\begin{equation*}
\Pr\left( \max_{1 \leq t \leq n} S_t &gt; \eps \right) \leq \sum_{t = 1}^n \exp\left( - \frac{\eps^2}{2 t \sigma^2 } \right),
\end{equation*}</p>
<p>from which we can see the upper bound is no less then</p>
<p>\begin{equation} \label{eq:union-bound}
n \exp\left( - \frac{\eps^2}{2 n \sigma^2 } \right).
\end{equation}</p>
<p>This bound is very loose. Later, you will see the reason.</p>
<h2 id="an-alternative-way">An alternative way</h2>
<h3 id="doobs-martingale-inequality">Doob&rsquo;s martingale inequality</h3>
<p>The formal statement of Doob&rsquo;s martingale inequality can be found in <sup id="fnref:1"><a href="#fn:1" class="footnote-ref" role="doc-noteref">1</a></sup>. We restate it in the following.</p>
<p>Suppose the sequence $T_1, \dots, T_n$ is a submartingale, taking non-negative values. Then it holds that</p>
<p>\begin{equation} \label{eq:doob-inequality}
\Pr\left( \max_{1\leq t \leq n} T_t &gt; \eps \right) \leq \frac{ \E[T_n] }{\eps}.
\end{equation}</p>
<p>With this tool in mind, we are now ready to bound $\eqref{eq:problem}$ in another way.</p>
<p>Using standard Chernoff&rsquo;s method, for any $\lambda &gt; 0$, we have</p>
<p>\begin{align*}
\Pr\left( \max_{1 \leq t \leq n} S_t &gt; \eps \right) &amp; = \Pr\left( \max_{1 \leq t \leq n} \exp(\lambda S_t) &gt; \exp( \lambda \eps) \right ).
\end{align*}</p>
<p>Since $\E[ \exp( \lambda X_t ) ] \geq \exp( \E[ \lambda X_t )] = 1$, sequence $ \exp(\lambda S_1), \dots, \exp(\lambda S_t)$ is a submartingale. (This is a good exercise. You can validate it by yourself.) By $\eqref{eq:doob-inequality}$, we further have</p>
<p>\begin{align*}
\Pr\left( \max_{1 \leq t \leq n} S_t &gt; \eps \right) &amp; \leq \frac{ \E[\exp(\lambda S_n )] }{ \exp(\lambda \eps) } \\
&amp; = \frac{ \prod_{t = 1}^n \E[ \exp(\lambda X_t )] }{ \exp(\lambda \eps) } \\
&amp; \leq \exp\left( \frac{\lambda^2 \sigma^2 n}{2} - \lambda \eps \right),
\end{align*}</p>
<p>where the second equality is due to the mutual indenpendency of $X_t$&rsquo;s, and the last inequality is due to $\eqref{eq:ele-prop-subgaussian}$.</p>
<p>The minimum is achieved when $\lambda = \frac{\eps}{ \sigma^2 n}$. So we finally get</p>
<p>$$
\Pr\left( \max_{1 \leq t \leq n} S_t &gt; \eps \right) \leq \exp\left( - \frac{\eps^2}{2 n \sigma^2 } \right),
$$</p>
<p>which is only one $n$-th of $\eqref{eq:union-bound}$!</p>
<p>Note that Lemma 2 in <sup id="fnref:2"><a href="#fn:2" class="footnote-ref" role="doc-noteref">2</a></sup> gives the same statement. However, I think it is more direct to use Doob&rsquo;s martingale inequality.</p>
<div class="footnotes" role="doc-endnotes">
<hr>
<ol>
<li id="fn:1">
<p><a href="https://en.wikipedia.org/wiki/Doob%27s_martingale_inequality"target="_blank" rel="noopener noreferrer">Doob&rsquo;s martingale inequality</a>, Wikipedia.&#160;<a href="#fnref:1" class="footnote-backref" role="doc-backlink">&#x21a9;&#xfe0e;</a></p>
</li>
<li id="fn:2">
<p>Shengjia Zhao, Enze Zhou, Ashish Sabharwal, and Stefano Ermon. <a href="https://papers.nips.cc/paper/6493-adaptive-concentration-inequalities-for-sequential-decision-problems"target="_blank" rel="noopener noreferrer">Adaptive Concentration Inequalities for Sequential Decision Problems
</a>. In NIPS, pages 1343–1351, 2016.&#160;<a href="#fnref:2" class="footnote-backref" role="doc-backlink">&#x21a9;&#xfe0e;</a></p>
</li>
</ol>
</div>
</description>
</item>
<item>
<title>Test</title>
<link>https://alanthink.github.io/blog/posts/2017-12-02-test/</link>
<pubDate>Sat, 02 Dec 2017 00:00:00 +0000</pubDate>
<guid>https://alanthink.github.io/blog/posts/2017-12-02-test/</guid>
<description><p>This is a post for testing latex formulas.</p>
<h2 id="inline-formulas">Inline formulas</h2>
<p>$e^{ix} = \cos x + i \sin x$.</p>
<h2 id="display-formulas">Display formulas</h2>
<p>$$
\sum_{i = 1}^{\infty} \frac{1}{n^2} = \frac{\pi^2}{6}.
$$</p>
</description>
</item>
</channel>
</rss>