Tag Info

New answers tagged

2

If you completely start over afresh with four new coin tosses if you get a number $>9$, then this method is impartial (and will eventually succeed almost surely, the expected number of 4-rounds is less than $2$). Each o fthe $10$ used outcomes is equally likely because each of the $16$ outcomes in total is equally likely. If you did not throw away all ...


1

This works fine. No different than if you needed numbers from 1-5 and used a six sided fair die. You would discard the 6 result.


0

To answer the first question, it seems this procedure is called the Serial Approximate Entropy Test, according to section 2.12 of the NIST Statistical Test Suite for the Validation of Random Number Generators and Pseudo Random Number Generators.


0

An example of a random process yielding multiple iid random variables could be one of the dimensions of some widget coming off an automated assembly line. We want this dimension of the widget to be within a certain tolerance of a certain value, but the machines that make it produce widgets with a variety of sizes of this dimension. Let $X_k$ be the size of ...


1

I can't see why you would use a normal distribution, which is a bell-shaped curveā€”not what you want. Use a uniformly-distributed random variable. Solution $1$ is acceptable only if you don't care that there is quite a bit of dependence between customer rewards (since it seems you basically assign $90$ one-percent coupons, $5$ ten-percent coupons, $3$ ...


1

Let $1 \leq a_1, \dots, a_n \leq N$ be number chosen uniformly at random. What is their least common multiple? What is the highest power of $2$ dividing any of the $a_1, \dots, a_n$? All the numbers are odd with probability $(1 - \frac{1}{2})^n$ All the numbers are odd or even (but not divisible by 4) with probability $(1 - \frac{1}{4})^n$ All the ...


3

Clearly, when $b=0$, $v=a$, so it is not a uniform random variable. When $b \neq 0$, we have that $b$ has an inverse in $\mathbb{Z}_p$, so we have for $c \in \mathbb{Z}_p$ $$\mathbb{P} ( v = c) = \mathbb{P} ( a + b r =c) = \mathbb{P} ( b r = c - a) = \mathbb{P}(r =b^{-1}(c-a)) .$$ Since $r$ is uniform, we have $\mathbb{P}( r = \hat{c} ) = \frac{1}{P}$ for ...


0

Say we choose $n$ numbers. Let $p_n$ be the probability that they are all distinct. We have: $$p_n = \frac{14}{14} \cdot \frac{13}{14} \cdots \frac{14-(n-1)}{14}$$ Now, the probability that two numbers are the same is $1 - p_n$. Therefore find the smallest $n$ such that $p_n < 0.30$.


0

def f(n): ok = 0 periods = [set(range(i, i+ 10)) for i in range(1, 356)] //10-day periods for _ in range(n): birthdays = set(randint(1,365) for i in range(60)) //60 b-days for x in periods: if len(x & birthdays) >= 6: //intersection ok += 1 break return ok / n ...


1

To distinguish a factor of $10$ we can make the silly (but not far wrong) assumption that the chance any particular 10 day period has 6 birthdays is independent of any other period. We assume the birthdays are allowed to repeat dates. The chance that a particular 10 day period has exactly 6 birthdays is ${60 \choose ...


1

This is nonsense as it stands. If $X_i$ has mean $0$ and $Y_i$ is independent of $X_i$, then $X_i Y_i$ has mean $0$. If you want to get a random variable of mean $\eta$, just add the constant $\eta$. That is: Suppose $X_1, \ldots, X_n$ are independent ${\cal N}(0,1)$ random variables, and ${\bf Y} = (Y_1, \ldots, Y_n)$ is a vector-valued random variable ...


4

The number of ways of choosing $2$ cards out of $52$ twice is $\binom{52}2^2=1758276$. The number of ways of doing it such that the cards don't share any ranks is $$ \binom{13}{4}\cdot\frac{4!}{2!^2}\cdot4^4+2\cdot13\cdot\binom42\cdot\binom{12}2\cdot4^2+13\cdot12\cdot\binom42^2=1268592\;. $$ The three terms represent the three possibilities that $0$, $1$ ...


0

The number of ways to choose $C$ sets of $N$ elements from $P$ elements such that all elements are different across combinations is $$ \binom P{\underbrace{N,\ldots,N}_{C\text{ times}},P-CN}=\frac{P!}{N!^C(P-CN)!}\;. $$ The total number of ways to choose $C$ sets of $N$ elements from $P$ elements is $$ \binom PN^C=\frac{P!^C}{N!^C(P-N)!^C}\;. $$ Thus the ...


-1

If you wanted to make a random number generator using just addition then the golden ratio is your best option. Check out "Additive Recurrence": Low discrepancy sequence Because it is an odd number it has full period (2^32 for int, 2^64 for long) with 2's complement arithmetic . For a proper random number generator you could then use a (invertable, to keep ...


0

Generally speaking: One has an array of $n$ elements, of which the first $k$, say, are special: They are the ones that are to be selected $r$ times as often as the others. (For your specific numbers, $r = 1.35$.) Let $rp$ be the probability assigned to those special elements, and $p$ be the one assigned to the rest. Then we have $$ krp+(n-k)p = 1 $$ $$ ...


0

Let p be the probability in which a "normal" element is chosen. Then a "special" element should be chosen with probability 1.35*p. Correct? Then you can calculate p by knowing the number of normal and special elements (sum of all probabilities should be 1). To actually choose the element, you should use a random (uniformly distributed) floating point value ...


0

Make a list of 23 random numbers between 0 and 500 inclusive. Append 0 and 500 to the list, and sort it. Each hour's allotment is the difference between two adjacent numbers in the sorted list. (This rule allows both 0 and 500; excluding 500 is a bit trickier.)


2

The probability a given single number does not appear at least once is $\left(1-\frac{1}{100000}\right)^{10000} \approx e^{-1/10}$ so the expected number not appearing is $100000$ times this, near $90483.7$, making the expected number of unique numbers about $9516.3$, surprising close to what you observed.


2

When sample $n$ times from the set $\{1,\dots, x\}$, then the expected number of unique values is $x[1-(1-1/x)^n]$. With $n=10000$ and $x=100000$, this gives approximately $9516.303$.


0

Your question is strongly related to the birthday paradox. Calculating the expected value of unique numbers could be done, e.g., by using combinatorial arguments. But as to your question: Yes, such a number indeed seems to be plausible.


0

Your question is too ambiguous. I assume that you are asking for a strategy for A that guarantees winning in the long run no matter what strategy B chooses that is unknown to A, but even in that case it is not clear what is considered as winning. In this answer I assume that you want the limit infimum of the ratio of wins to games to be more than half. (1) ...


0

How do you obtain a fair, 5-sided die, is maybe the more important question? Also, since $5^{k}$ is odd, there would be no possible way to split up the $5^{k}$ outcomes of $k$ dice rolls into "heads" and "tails" in a perfectly fair way. Hmm, if $k$ can be variable, you can roll a $5$-sided die twice; if the first outcome is bigger than the second, call it ...


4

I think the subtlety here is that one can imagine all sorts of complicated criteria hidden inside the "finite" method. But, however complex the method is, in the end it has to come down to looking at sequences. To see this: First, "finite" means that there is some (known) number $k$ such that the outcome, H or T, is guaranteed to be established in $k$ or ...


1

It's clear that there are multiple ways to interpret this question, and the answer depends upon the interpretation. I personally agree with @lulu, that if a finite threshold is picked prior to die rolls, it will be impossible to determine a 'Head' or 'Tail' outcome due to the odd number of possible arrangement of dice rolls. If we are worried about finding ...



Top 50 recent answers are included