# Tag Info

1

The probability that any question is answered correctly is $p=0.2$. If the number of questions is $N=180$, the number you get right is $n$ and the maximum score $S_{max}=2$ your score is $s=\frac{n}{N}\times S_{max}$. Now $n\sim B(N,p)$, that is the number of correct answers has a binomial distribution with the given parameters. Then using the Normal ...

0

The prime numbers is the set of numbers derived by removing the set of composite numbers from the set of natural numbers. The pattern that the natural numbers follow is easily understood. The set of composite numbers also follow a discernable pattern:it is the union of the factors of 2, the factors of 3 etc. Therefore the prime numbers as defined in the ...

1

The crucial point is the level of significance of the test, if you consider $\epsilon = 2^{-1}$ then you are rejecting the null conjecture (It is a random array) in many cases. For some reason you are bound to think that many $0$ may occur. So you will reject randomness at the event the first $m$ digits are zero. You could also think that it is not very ...

-1

Random doesn't exist if two things are done the same way in the same circumstances only the same results can be observed

1

Your computation (actually, estimation) of the entropy in terms of a sequence, implicitly assumes that the succesive symbols are independent (and the source is stationary, of course). However, it seems intuitively true that the second sequence is more "random" than the first sequence and hence should, in some sense, have higher entropy. Your ...

0

Realities of Discrete vs. Continuous. Continuous random variables are a useful abstraction. However, in real life or in a computer simulation, one cannot really sample from a continuous distribution. Results need to be rounded to some number of decimal places for practical purposes. Then the results represent intervals. For example, the 'observation' 93.42 ...

0

A small correction: the most general way to handle this is through the quantile function of the random variable $X$, which is defined by $Q_X(p)=\inf \{ x \in \mathbb{R} : F_X(x) \geq p \}$ for $p \in [0,1]$. Then if $U$ is uniform on $[0,1]$ then $Q_X(U)$ has the same distribution as $X$. Note that the quantile function is properly defined even when $F_X$ ...

0

Usually this is all done on computer, and you can simulate a (pseudo)-random number up to some finite precision after the $0 . \cdots$ such that the number is uniform in the space being sampled from $[0,1]$. Then you apply the $F^{-1}$. What this really means is that you are inverting an INTERVAL, since you don't specify the infinite expansion after the ...

0

You want to generate a random variable $B$ satisfying $\Pr(0<B<t) = t^3/8$ for $0 \le t \le 2$. You are given a random variable $A$ which satisfies $\Pr(0<A<t) = t/2$ for $0\le t \le 2$. So rewrite the equation for $B$ as $\Pr(0<B<(4t)^{1/3}) = t/2$, or $\Pr(0 < B^3/4 < t) = t/2$. So $B^3/4$ is a uniform random number in the ...

1

Let $P_{ij}$ be the permutation matrix that exchanges row $i$ with row $j$. Then you can exchange column $i$ with column $j$ by applying the associated permutation matrix to the transpose of your matrix, then transposing back:

1

Using NIST Standard 800-22, "A Statistical Test Suite for Random and Pseudorandom Number Generators for Cryptographic Applications", I can use Hamming Weight as the basis for a spectral test. That is good enough to expose the bug.

2

I suggest that you check "The Art of Computer Programming", Vol. 2 (Seminumerical Algorithms), by Donald E. Knuth. Chapter 3 is completely devoted to random number generators, and tests to determine randomness. You will find many tests that you can apply to your data. I would recommend the Fourier test, which has yielded good results for me. Nevertheless, I ...

0

Thanks to the hint with the Coupon Collector's problem I was able to figure out how to calculate that. Python code: #!/usr/bin/python3 import math bincnt = 24 throws = 99 def nPr(n, r): return math.factorial(n) // math.factorial(n - r) def nCr(n, r): return nPr(n, r) // math.factorial(r) psum = 0 for j in range(bincnt): term = ((-1) ...

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 ...

Top 50 recent answers are included