Probability of two boys if one is a boy
In a family with two children, what are the chances, if one of the children is a girl, that both children are girls?
Optimizing $(X_{n}+c)^{2}$ to show that $P(\overline{X}_{n}\geq \lambda) \leq E(X_{n}^{2})/(EX_{n}^{2}+ \lambda^{2})$ Define $\overline{X}_{n}:=\max\limits_{1\leq m \leq n} X_{m}$ and let $(X_{n})_{n}$ be a martingale where $X_{0}:=0$ and $EX_{n}^{2}&lt; \infty$  Show that $P(\overline{X}_{n}\geq \lambda) \leq E(X_{n}^{2})/(EX_{n}^{2}+ \lambda^{2})$  As a hint: Consider $(X_{n}+c)^{2}$ and optimize over $c$.  It is clear that $((X_{n}+c)^{2})_{n}$ is a submartingale and when I optimize over $c$, I get:   $X_{n}^{2}+2X_{n}c +c^{2}\Rightarrow 0=2X_{n}+2c=0\Rightarrow -X_{n}=c$  It is also clear I need to use Doob's inequality but I am not sure how to go about this, and how the above optimization helps me. I've been playing the heck out of this game for the past few days, and I noticed some players had some nice shiny golden guns.  What conditions do I need to fulfill in order to unlock these weapons? (Are the they tied to the story mode, Amiibo, etc.)? Is there an easy way to TeX geometric pictures? I need a shapefile for India which is up-to-date to display the regional borders. By up-to-date (in 2014), I mean that it includes Telangana as a state. Many shapefiles that I downloaded do not have Telangana as a state as it was partitioned a month ago, it is displayed as part of Andhrapradesh.  So I need the latest shapefile. Every partially defined isometry can be extended to a isometry I know that the following theorem holds true:  Let $S$ be a subset of $\mathbb R^n$, and let $f:S\to \mathbb R^n$ a map such that $d(p,q)=d(f(p),f(q))$ for every $p,q \in S$ (here $d$ is the usual euclidean distance). Suppose that $0 \in S$ and $f(0)=0$. Then $f$ can be extended to an orthogonal transformation of $\mathbb R^n$.  I have two questions:   Can someone give me a reference of a proof of this theorem? I believe that the previous theorem holds true also if we change $\mathbb R^n$ with $\mathbb C^n$ and "orthogonal" with "unitary", with nearly the same proof. Does it holds true also in the $ \ell^2$ space? With the same proof? How is money held in escrow for a home purchase from a IRA treated by the IRS? How do the Incredible Hulk's pants stay on but not his shirt? I guess I can live with the fact that the  changes size drastically when he transforms, but why does his shirt rip off and not his pants?  I think that we need a little better answer than "it keeps us tied to the fact that inside he's still human". Remap Keys in Linux I'd like to switch my Ctrl and Alt keys under Linux (to make it more Mac-like).  How do I do this?  If it helps, I'm running Ubuntu 9.04. Bravo for allowing comment editing, but what's the explanation for enforcing a five-minute window?  I think this might be over-engineering. If I have a spelling mistake or an inaccuracy I'd like to fix, I don't think the fact that five minutes has elapsed should prevent me from fixing it.  Further, if you are worried people will edit their comments in a way that makes the comment thread nonsensical, they can already do this by deleting their comment. So, limiting the ability to edit isn't really helping much in that regard.  Update  If people don't like this idea, I'm definitely open to hearing your reasons. For now, it seems like an unnecessary limitation of a quite awesome feature.  Update 2  Regarding John's scenario...     Me: Obama is cool!   You: You are right, man!      My edit: Obama is an idiot!   You: You are right, man!   ...this problem can still occur with deletions...     user1: Obama is cool!   user2: No, McCain is cool!   you: You are right, man!        user1: Obama is cool!   ---- deleted -----   you: You are right, man!     So, yes, editing could be abused as you suggest, but discontinuities can occur already because of deletions (and as someone else mentioned, because upvoted comments get prioritized upward).  As for Jeff's argument about rate limiting, I agree that is important, but I don't understand why you can't just use a CAPTCHA to prevent too many edits in a short period of time. I would like to know how to unload an assembly that is loaded into the main AppDomain.  I have the following code:  var assembly = Assembly.LoadFrom( FilePathHere );   I need/want to be able to unload this assembly when I am done.  Thanks for your help. I'm trying to use the Bash parameter expansions to modify the output of a command substitution or another parameter expansion. The following nested expansions work quite well in Zsh; but result in a &quot;bad substitution&quot; error in Bash: ${${PWD##*/}//trunk/latest}  or ${$(basename $PWD)//trunk/latest}  the output should be the last folder of the $PWD, replaced by latest when my current directory is trunk so /home/user/trunk should become latest Is there a Bash equivalent allowing to chain expansions without relying on variables or pipes? Or do Bash expansions only allows the input to be a string or a plain variable? Expected number of hamiltonian paths in a tournament The following theorem is from Alon&amp;Spencer's The probabilistic method, in the beginning of chapter 2:  Theorem 2.1.1: There is a tournament $T$ with $n$ vertices and at least $\frac{n!}{2^{n-1}}$ Hamiltonian paths.  Briefly the theorem is proved by looking at $X_\sigma$ the indicator random variable for a permutation $\sigma$ giving a Hamiltonian path, that is, satisfying $(\sigma(i),\sigma(i+1))\in T$ for $1\leq i \lt n$. Then   $\sum \mathbb{E}\left[X_\sigma\right] = \frac{n!}{2^{n-1}}$.  I don't understand where did this value ($\frac{n!}{2^{n-1}}$) came from! could someone explain it please? Java Swing: Displaying images from within a Jar I am trying to run an executable file from a network drive on Windows 7 Professional (64-bit) in order to install a program, but, each time I try, it doesn't run and the following message appears:  {path-name} The specified path does not exist. Check the path, and then try again.   I am definitely connected to the network drive as I can see all of the directories and files, and can even open non-executable file types. Also, I am fairly confident that this is neither a firewall nor a permissions issue. How to check who owns the Slack's workspace? I'd like to check who owns (or at least some kind of public profile page) some workspace based on its subdomain (e.g. xyz.slack.com).  Is it possible? Smallest positive element of $ \{ax + by: x,y \in \mathbb{Z}\}$ is $\gcd(a,b)$ Let $S = \{ax + by: x,y \in \mathbb{Z}\}$  and let $e &gt; 0$ be the smallest element in $S$. Prove that $e \mid a$, and hence prove that $e = \gcd(a,b)$  I'm afraid I can't provide much of my initial working here because I'm at a loss of how to start.  I suppose that to show $e\mid a$ I would have to show that $eg = a$ for some $g \in \mathbb{Z}$. But I have no idea how I would do this. Characterization of weak convergence in $\ell_\infty$ Is there some simple characterization of weak convergence of sequences in the space $\ell_\infty$? If yes, is there some similar claim for nets?   I was only able to come up with a characterization of sequential weak convergence using limit along ultrafilters, which I will describe below. I wonder whether there is some insight into this characterization. (E.g. whether there is some simple reformulations which does not use ultralimits.) Moreover, I do not know whether at least this characterization works for nets, too.  We have the following result describing weak convergence in $C(K)$, see e.g. Corollary 3.138,  in Banach Space Theory by Fabian, Habala et al. (It is a consequence of Rainwater theorem and characterization of extreme points of unit ball in $C(K)^*$.)     Let $K$ be a compact topological space. Let $\{f_n\}$ be a bounded sequence in $C(K)$ and $f\in C(K)$. Then, if $f_n\to f$ pointwise, we have $f_n\overset{w}\to f$.   Moreover we have isometric isomorphism between $\ell_\infty$ and $C(\beta\mathbb N)$, which is described e.g. in the Wikipedia article on  or in  of Carothers' book A short course on Banach space theory. This isomorphism assigns to each bounded sequence $(x_n)$ the continuous function $\overline x$ on $\beta\mathbb N$ defined by $$\overline x(\mathscr U) = \operatorname{\mathscr U-lim} x_n,$$ where $\operatorname{\mathscr U-lim} x_n$ denotes the  of $x_n$ w.r.t the ultrafilter $\mathscr U$.  Combining the above results we get the following characterization:      Let $f^{(n)},f\in\ell_\infty$. The sequence $f^{(n)}$ converges to $f$ weakly if and only if for every ultrafilter $\mathscr U$    $$\lim_{n\to\infty} \operatorname{\mathscr U-lim} f^{(n)}= \operatorname{\mathscr U-lim} f.$$   (The above claim for principal ultrafilters is just a pointwise convergence. But in the above claim the equality is required for free ultrafilters, too.) I have seen people showing one slide progressively by pressing Enter. Could anyone tell me how to realize that in Beamer? Show that $x_{n+1}-\dfrac{x_n}{2}$ converges to zero implies that $(x_n)_n$ also converges to zero. Let $(x_n)_n$ be a sequence of real numbers such that $$\lim\limits_{n\rightarrow \infty}\left( x_{n+1} - \dfrac{x_n}{2}\right)=0.$$ Show that $(x_n)_n$ must also converge to zero.     $\textbf{My Attempt:}$   My original idea was to use the triangle inequality and the fact that $$\lim\limits_{n\rightarrow \infty}\left( x_{n+1} - \dfrac{x_n}{2}\right)=0$$   to show that the sequence $(x_n)_n$ is Cauchy and hence converges to some real number $a$, which would give me $$\lim\limits_{n\rightarrow \infty}x_n=a=\lim\limits_{n\rightarrow \infty}x_{n+1}\implies a-\dfrac a 2= \lim\limits_{n\rightarrow \infty}\left( x_{n+1} - \dfrac{x_n}{2}\right)=0\implies a=0.$$ However, I'm having trouble showing that $(x_n)_n$ is Cauchy.   Any suggestions/hints would be greatly appreciated. Thanks! Vectors, structs and std::find