Suppose we randomly draw a real number from $[0, 1]$ for $n$ times, and get an array: $a_1, a_2, ..., a_n$. If for some integer $i$ such that $2&lt;=i&lt;=n-1$ and $a_{i-1}&lt;a_i$ and $a_i&gt;a_{i+1}$, we call $a_i$ a peak in the array.  The question is: what is the expected number of peaks in the array $a_1, a_2, ..., a_n$?  For example, in array $[0.6,0.3,0.7,0.4,0.9,0.8]$, there are $2$ peaks: $0.7$ and $0.9$.
123586
Recently I came across this question:  Given a random permutation of integers 1, 2, 3, …, n with a discrete, uniform distribution, find the expected number of local maxima. (A number is a local maxima if it is greater than the number before and after it.) For example, if n=4 and our permutation was 1, 4, 2, 3, then the # of local maxima would be 2 (both 4 and 3 are maxima). I know the answer will be (n+1)/3 .I wanted to know what will be the answer when we have to consider the local maxima as well as the local minima i.e Finding out the expected number of local maxima and local minima.
121387
Is it true or false that $\lvert P([0, 1]) \setminus P((0, 1)) \rvert &gt; \lvert P(\mathbb{N}) \rvert$ ?  I need a hint because I don't see a way to solve this
74131
I was doing some software engineering and wanted to have a thread do something in the background to basically just waste CPU time for a certain test.  While I could have done something really boring like for(i &lt; 10000000) { j = 2 * i }, I ended up having the program start with $1$, and then for a million steps choose a random real number $r$ in the interval $[0,R]$ (uniformly distributed) and multiply the result by $r$ at each step.   When $R = 2$, it converged to $0$. When $R = 3$, it exploded to infinity.    So of course, the question anyone with a modicum of curiosity would ask: for what $R$ do we have the transition. And then, I tried the first number between $2$ and $3$ that we would all think of, Euler's number $e$, and sure enough, this conjecture was right. Would love to see a proof of this.    Now when I should be working, I'm instead wondering about the behavior of this script.   Ironically, rather than wasting my CPUs time, I'm wasting my own time. But it's a beautiful phenomenon. I don't regret it. $\ddot\smile$
81098
The sequence $a_n=(1/2)^{(1/3)^{...^{(1/n)}}}$ doesn't converge, but instead has two limits, for $a_{2n}$ and one for $a_{2n+1}$ (calculated by computer - they fluctuate by about 0.3 at around 0.67). Why is this?
29271
I am having some trouble solving the following.  You draw cards from a standard 52-card deck without replacement until you get an ace. You draw from what is remaining until you get a 2. You continue on with 3. What is the expected number you will be on after the entire deck runs out?  It was natural to let   $T_i = \text{first position of card whose value is }i$ $U_i = \text{last position of card whose value is }i$   So the problem essentially amounts to figuring out the probability that you will be on $k$ when the deck runs out, namely:  $$Pr(T_1&lt;\cdots&lt;T_k \cap U_{k+1} &lt; T_k)$$  I can see that  $$Pr(T_1&lt;\cdots&lt;T_k) = 1/k!  \\  \text{and}  \\ Pr(U_{k+1} &lt; T_k) = 1/70$$  but could not get any further...
31747
We all know that $0.99999...=1$  So does that imply $[0.99999...]=1?$  Or do we consider it as $0?$  My doubt is: any gif of the form $[0.xyz...]=0$. If $[0.99999...]=1$ won't that be contradicting?   There isn't much clear explanation in the previous post.  Here $[.]$ is the greatest integer function. I couldn't find a post containing this query on MSE. Please help :)
79023
Consider the real interval $[0,1)$, this is partially ordered set (totally ordered actually). This set has a upper bound like $1$, and according to Zorn's Lemma each partially ordered set with a upper bound should have at least one maximal element. However, in this set there is no maximal element, i.e., element that is greater than every element of the set because you can be as close as to $1$. I am should I don't understand Zorn's Lemma. Please Help!!
89829
A number is removed from the set of integers from $1$ to $n$. Now, the average of remaining numbers turns out to be $40.75$. Which integer was removed?  By some brute force, I got $61$. I want to know if there's any analytic approach?
119103
Omg this is driving me crazy seriously, it's a subproblem for a bigger problem, and i'm stuck on it.  Anyways i need the number of ways to pick $x[1]$ ammount of objects type $1$, $x[2]$ ammount of objects type $2$, $x[3]$ ammounts of objects type $3$ etc etc such that $$x[1] + x[2] + \ldots x[n] = k\;.$$ Order of the objects of course doesn't matter.  I know there is a simple formula for this something like $\binom{k + n}n$ or something like that i just can't find it anywhere on google.
21223
Here is the setup: Bob runs an experiment: he flips a coin N times (between 0 and +$\infty$). The coin has a probability p of landing on heads. Bob starts with zero points. For each head, Bob scores a point. Now, Bob goes to Alice and tells her p and that the score is zero, and ask her the probability that he flipped the coin N=n times. The case that make it special for me is the addition of the possibility of zero draws, and I'm stuck with it. Here is my attempt at solving this: N is the random variable counting the number of flips, S is the random variable counting the score. We want to know $P(N=n|S=0)$. $$ P(N=n|S=0) = \frac{P(S=0|N=n) \cdot P(N=n)}{P(S=0)} $$ Now $P(S=0|N=n)= (1-p)^{n}$ so that's good. Also, $P(S=0) = P(N=0) + \sum\limits_{n=1}^\infty (1-p)^{n}P(N=n) $ But now I'm stuck since I don't know what do with that $P(N=n)$. Now you could argue that since we know nothing about the distribution of N, the most reasonable assumption is that they are all equally likely. Then the substitution occurs as: $$ P(N=n|S=0) = \frac{P(S=0|N=n) \cdot P(N)}{\frac{1}{p}\cdot P(N)} = p(1-p)^{n} $$ This feels like cheating. Not because of the limit, this looks legit cf replace $\infty$ with $N_{max}$ and take the limit at the end, but because of the assumption on $P(N)$ being uniform. While keeping $N_{max}$ this is good, but it seems shady when taking the limit. Also, what do I know if it is uniform ? Am I doing something wrong here ?
44825
In answering , I came across a phenomenon the likes of which I don't think I've encountered before, and I'd like to know more about it.  You draw coins, each coin independently being a $1$€ coin or a $2$€ coin with equal probability. Obviously you'd expect to draw as many $2$€ coins as $1$€ coins. In particular, the expectation of $A-B$, where $A$ is the number of $1$€ coins drawn and $B$ is the number of $2$€ coins drawn, is $0$ after any given number of draws.  However, conditional on reaching a total value of $n$ euros, the expectation of $A-B$ tends to $\frac13$ for $n\to\infty$ (in fact, it's positive for all $n\gt2$): The probability to reach $n$ euros with $k$ $2$€ coins and $n-2k$ $1$€ coins is $\binom{n-k}k2^{k-n}$, so the expectation of $B$ is  \begin{eqnarray*} &amp;&amp;\frac{\sum_{k=0}^n\binom{n-k}k2^{k-n}k}{\sum_{k=0}^n\binom{n-k}k2^{k-n}}=\frac{\frac2{27}(3n-1)+O\left(2^{-n}\right)}{\frac23+O\left(2^{-n}\right)}=\frac n3-\frac19+O\left(2^{-n}\right)\;,\\ \end{eqnarray*}  the expectation of $A=n-2B$ is $\frac n3+\frac29+O\left(2^{-n}\right)$, and  the expectation of $A-B$ is $\frac13+O\left(2^{-n}\right)$.  This is rather counterintuitive (to me): For any given number of coins the expectation is $0$, but for any given value of the coins it's positive. This is the stuff that paradoxes are made of if you're not careful how you talk about it, e.g.: &ldquo;Someone is playing this game. What value do you expect for $A-B$?&rdquo; &ndash; &ldquo;$0$.&rdquo; &ndash; &ldquo;So far they drew $137$€. Now what do you expect?&rdquo; &ndash; &ldquo;$\frac13$.&rdquo;  The resolution here is (as it often is) that the conditions aren't properly defined &ndash; we don't know why and when the person is telling us this amount. If they fixed a number of draws to wait for and then told us the total value at that point, the correct answer would still be $0$; if they fixed a total value to wait for and then told us when it was reached, the correct answer would be $\frac13$, but then the paradox of changing our mind just because we were told some number, no matter which one, wouldn't arise, because it's the stopping protocol that makes the difference.  Still, a certain uneasy sense of paradox remains, even if it temporarily retreats under the glare of careful analysis.  I don't have any concrete questions about this, but I'd be interested to hear about any other cases where such a phenomenon occurs, or names by which it's known, or approaches to deal with it, and perhaps also to ease that lingering sense of paradox.
95699
I confirmed on  thread that there are as many as even natural numbers as there are natural numbers.   Question : Suppose I have selected a number $n \in \mathbb N$; what is the probability that $n$ is even?  My Thought : $\text{Probability} = \dfrac{\text{n(E)}}{\text{n(S)}}$ Here $\text{n(S)}$ is the set of all natural numbers i.e. $\mathbb N$, and $\text{n(E)}$ is set of all even natural numbers. Since it is proved that number of elements is the set $\mathbb N$ is exactly the same as the number of elements in the set of natural numbers (it’s very easy to put the set of natural numbers, $\Bbb N=\{0,1,2,3,\dots\}$, into one-to-one correspondence with the set $\text{E}=\{0,2,4,6,\dots\}$ of even natural numbers; the map $\Bbb N\to \text{E}:n\mapsto 2n$ is clearly a bijection.) ; Thus, Probability $= \boxed 1$ I know this is definitely wrong.Probability must be $0.5$. But where am I wrong? Can anyone explain ? Thanks!
75049
If $a_1=1$ and for n&gt;1$$a_n=a_{n-1}+ {1 \over {a_{n-1}}} $$ $a_{75}$ lies between (a) (12,15) (b) (11,12) (c) (15,18)  Now , in this question, I rewrote, $a_n-a_{n-1} = {1 \over {a_{n-1}}}$, to make a telescopic type and summed the terms to get $$a_n-a_{1}= {1 \over {a_{n-1}}}+ {1 \over {a_{n-2}}}...{1 \over {a_{1}}}$$ And as ${1 \over {a_{r}}} &lt;1$ for all r , I got $a_{75} &lt;76$ , but it's of no help as , the upper bound is much higher. I got no further ideas , on how to solve it, please help.
99775
Suppose I have a set of 100 integers. I randomly choose 10 of those, make a note of which ones I selected, and repeat the process. What is the expected number of times this process must be repeated before I see all 100 integers?  I'm also greatly interested in how this is calculated as I'm trying to increase the expected number of times this process is repeated by changing the set sizes.
83982
I've seen many variations of this problem but I can't find a good, thorough explanation on how to solve it. I'm not just looking for a solution, but a step-by-step explanation on how to derive the solution.  So the problem at hand is:   You have m balls and n bins. Consider throwing each ball into a bin uniformly and at random.    What is the expected number of bins that are empty, in terms of m and n? What is the expected number of bins that contain exactly 1 ball, in terms of m and n?   How would I approach solving this problem?  Thanks!
114348
Problem Statement:- The number of zeroes at the end of the integer   $$100!-101!+\ldots-109!+110!$$   I am having a bit of a trouble in thinking how do I proceed. A little push in the right direction would be appreciated.   And if you are posting a full solution do use the spoiler tag, as sometimes I cant stop myself from seeing the whole solution and lose the chance of thinking through it by myself with a push in the right direction from you guys.  Also, I dont know whether I am using the right tag feel free to correct it if its wrong.
79721
Take the square $[0,1]^2$ we take $n$ random lines through the square. You can choose random lines by choosing a point on one of the sides of the squares and randomly choosing a different point on any of the other three sides and then drawing a line connecting them.   What is the probability that after $n$ of these random lines the largest region is greater than or equal to $0.5$?  Any tips or cases help, thanks.