# Tag Info

0

wlog, assume that $k \le n/2$. Indeed, if $k > n/2$, then you can instead generate a random combination of $n-k$ items from $n$ items, and inverse it. Start with an empty set. Repeatedly generate a random number between $1$ and $n$. If this number is not in the set, add it to the set. Repeat until the set contains $k$ elements. What is the complexity of ...

0

The way you describe the picking procedure (which is somewhat asymmetric: low and high values of $A$ have the same probability, but high values of $B$ are much more likely than low values) we have $$p=\int_0^1\int_0^1\frac1{1-a}\int_a^1\frac1{1-c}\int_c^1f(a,b,c,d)\,\mathrm dd\,\mathrm db\,\mathrm dc\,\mathrm da$$ where ...

0

I did the following empirical test in python and the answer seems to be 1/4. I still don't know how to arrive at the answer theoretically though. def checkifbelong(x1, y1, x2, y2): if (x2 >= x1 and y2 <= y1) or (x1 >= x2 and y1 <= y2): return True else: return False avg = 0 ran = 100000 for i in range(0, ran): A = ...

0

One can generate $n$ random $x_i$ with uniform distribution on $\{1, \ldots, b_i\}$, and then discard the result if $\sum_i x_i \leq c$.

3

The simplest example of a "universe" number is the Champernowne constant, $$0.12345678910111213141516\dots$$ Among others, it contains the $n$ first decimals of $\pi$, for any $n$.

2

The normal distribution is maximally uncertain on the real line. Precisely, this means that the normal distribution has the highest entropy of all distributions on the real line. In this way, if your distribution has a mean and standard deviation, and support equal to the real line, and you know nothing more, then from an entropy point of view, the best ...

2

The reason the Normal is a reasonable fit for a lot of phenomena can be explained via the Central Limit Theorem: Roughly, it says that a sample average of iid random variables $X_i$ with mean $\mu$ and standard deviation $\sigma$ from any distribution will approach a Normal distribution: $$\lim_{n\rightarrow \infty}P\left( \frac{\sum^n (X_i-\mu)}{n} \in ... 0 No. Random physical processes don't necessarily have to be distributed like the normal distribution. The text you referenced is talking about how in physical processes will give a distribution similar to the normal distribution. Think of throwing a dart at a dartboard and measuring the distance it lands from the bullseye (ignore the actual rules of darts ... 1 It's not a necessary condition. There are natural processes that are well modeled by other distributions such as the Poisson distribution for waiting times. Some processes are naturally normal such as a random walk. Other processes converge to normality in the limit. For example, the average of many trials of a uniform distribution on an interval, is ... 0 What sort of numbers are you selecting? If you agree to use n bit unsigned integers you are just trying to avoid the few that the computer will use for the search. For example, if n=10 the range is 0-1023 Presumably the computer's first guess will be 511 or 512 so those are poor choices. If you say lower, the next choice will be 255 or 256, ... 0 You have to formulate your problem more rigorously since it's not clear how a binary search could land on an irrational number like e or \pi. But here's a hint for the idea you're working with: For example, my guess will be 0.25, so the computer will find it in 2 guesses, but then I'll change my guess to 0.25+0.502, but that will be found in 3 ... 0 Probability 1 doesn't been that it is inevitably. For example, the probability of throwing a dart not on a diagonal of a specific square is 1. However, it is not impossible that the dart lands exactly on the diagonal. 4 It doesn't really make sense, as pointed out by @drhab. But you could interpret the problem as follows: let p(R) be the probability that x^2+2bx+c has real roots when b and c are chosen randomly and independently from a uniform distribution on [-R,R]; then find \lim_{R\to\infty}p(R). In this case we have$$p(R)=P(c\le ...

1

Starting with $N$ zero bits and performing $F$ flips. Let's look at a single bit. There are $(N-1)^{F-k}\binom{N}{k}$ ways that our bit can be flipped $k$ times. There are $N^F$ ways the random choices can go, so define $p_k$: $$p_k = \frac{(N-1)^{F-k}}{N^F}\binom{N}{k}$$ The generating function $G(x)$ for the number of flips is: $$G(x) = \sum_k p_kx^k ... 5 After N=2T toggles, the average value of any bit is$$\sum_{k=0}^{T-1}\frac{(W-1)^{2T-2k-1}}{W^{2T}}{2T\choose 2k+1}\\ =\frac12-\frac12\left(\frac{W-2}W\right)^{2T}$$and the second term is roughly \frac12e^{-2N/W}. Use enough toggles to make that difference small enough. 1 Say you have n elements, k of them unweighted. Assign them probability p_1. Now if one element has weight w_1, its probability is (1+w_1)p_1 [ 1.2p_1 in the example you gave] add all and equate with 1. Since p is the only unknown. p_1 = \frac{1}{n + \text{sum of weights}} 1 Without doing a lot of probability theory, here's my intuition. Scenario 1: You are not told a, but you are told k > a. That is a bit of a clue that a must be "small," so you'd be wise to guess b > a. In this case k provides useful, if weak, information. People who don't realize k gives some information might be inclined just to ignore k ... 2 Why it works First, to explain why the idea in the video works: Randomly select A, B and K from \mathbb{R} - the probability distribution used for each selection is irrelevant providing that it covers all \mathbb{R}; they can be the same or different. Therefore, there is a non-zero chance p that K falls between A & B. If that happens ... 0 You raise a lot of different questions, and it is not clear which one is most important to you. This is definitely an unusual way to write the generator. So either it was published somewhere, or it is not trustworthy (!). If it is published, you should be able to find it, even if the comments in the code are minimal. (What is the name of the generator in ... 0 To avoid philosophical debates (I assume you are looking for the mathematical concept) one deals with random variables (they can be though as numerical characteristics of your experiment) which are functions defined on a probability space (\Omega,\mathcal{B}, \mathbb{P} )$$X: \Omega \to \mathbb{R} In order that this construction makes sense, one ...

0

I believe a computation with straightforward combinations suffices. There are $d = {52 \choose 13}$ ways to deal a 13-card hand from a 52-card deck. The number of ways to get exactly 2 spades and exactly 4 hearts is $n_2 = {13 \choose 2}{13 \choose 4}{26 \choose 7}.$ The last factor is necessary to make sure the other cards are all chosen from among the ...

2

For a six-sided die, the expected value of a roll is $3.5$, but the probability of rolling $3.5$ is zero. Even if the expected value is attainable by the random variable, it still doesn't hold: for a $99$-sided die, the expected value of a roll is $50$, but the probability of rolling $50$ is $1/99$, nowhere near $1$. For a single trial, there is no ...

8

A key realization here is that the numbers themselves don't matter, and neither does the fact that this is a uniform distribution. The answer would be the same for any continuous distribution. All that matters is the rank ordering of the numbers. Given that any N distinct numbers were chosen, all $N!$ orderings of those numbers have equal probability. So ...

0

I fitted the average path lengths I obtained. $x$ axis: Size of square canvas $\times 100$ pixels. $y$ axis: Average number of iterations per bubble.

1

This is a simple model to estimate $\mathcal{N}$, the expected number of bubbles after some sort of equilibrium is reached. In this model, the bubble will be randomly displaced at each iteration. The first claim is $\mathcal{N}$ is proportional to $\mathcal{T}$, the expected life time of a bubble . After we start the system and wait long enough for the ...

0

EDITED: Let $N$ be the random variable giving the numbers of terms in a monotonic alternate sequence of uniformly distributed random numbers in [0,1). N takes the values $2,3,4, \ldots n, \ldots$. In order to get the probability distribution of $N$, we denote by $U_1, U_2, \ldots, U_n, \ldots$ a sequence of i.i.d. random variables, $U_n\sim Unif[0,1)$, ...

0

The chance that you pick at least two numbers is $1$. The chance you pull a third is $x_0$, because that is the room that $x_1$ has to be less. To make this a probability, we integrate over $x_0$, getting $\int_0^1(1-x_0)dx_0=\frac 12$. The chance that we pick a fourth is $1-x_1$, but the distribution of $x_1$ is not uniform. On a relative basis, the ...

0

Generalize from 3D: vec[0] = sin(rand1 * PI * 2) * cos(rand2 * PI * 2) * cos(rand2 * PI * 2); vec[1] = cos(rand1 * PI * 2) * cos(rand2 * PI * 2) * cos(rand2 * PI * 2); vec[2] = sin(rand2 * PI * 2) * cos(rand3 * PI * 2); vec[3] = sin(rand3 * PI * 2);

1

There will always be an equilibrium. You have a fixed rate of bubble productions, but the popping rate will be proportional to how many bubbles are on screen at the time. Thus the number of bubbles will rise until the popping rate matches.

0

I would make sense that there is some kind of equilibrium. I've been performing some calculations but have not gotten far. Perhaps it is would be interesting to start with a number of bubbles higher than, say, 500, and see whether the number of bubbles converges back to the said range. Edit: I wrote a script based on your description of the system and ...

0

There are many ways to do this. One is given here: http://mathworld.wolfram.com/HyperspherePointPicking.html Summary: Generate $x_1,\dots,x_4$ using the standard normal distribution (often built-in) and normalize the vector $[x_1,\dots,x_4]$ to have unit length.

Top 50 recent answers are included