Random Number Generation - What is the 'middle one of three'?

In summary, the conversation discusses finding a formula for the logistic random variable X in terms of a sequence of random numbers R. The solution for part (i) is provided, and for part (ii), it is clarified that the "middle one of three" refers to generating three random numbers and choosing the middle one, with an example of how to do so using the given sequence. A correction is made to the calculations for X_1 and X_2.
  • #1
Pyroadept
89
0

Homework Statement


The logistic random variable X has CDF:

F(X) = exp(a + bx)/(a + exp(a + bx)), b>0

(i) Obtain a formula for random values of X in terms of R ~ U(0,1)

(ii) Using the cdf, suppose that a certain application requires you to generate 'the middle one of three' i.i.d. logistic - generate two such values.

Use the following sequence of random numbers. If you run out, start again from the beginning:

0.9892, 0.2842, 0.9349, 0.9029, 0.3494, 0.9891, 0.6072, 0.4893


Homework Equations





The Attempt at a Solution



Hi everyone,

Here's my solution so far:
--
(i)
Solve for X using R = F(X)

Multiplying across and factorising, we get:

exp(a+bx).(1 - R) = R

Now taking natural logs and regarranging, we get:

X = (1/b).[ln(R/(1-R)) - a]

... an equation for X in terms of R, so could call it X(R)

(ii)
I will generate random values of X using the following method:

Let random value of X = X(R_i),

where R_i is the ith random number given in the sequence above.

My question is - what do they mean by 'middle one of three'? Do I generate three random numbers and then pick the middle-valued one? It seems a bit straightforward, but I can't see what else it could be.

If that is the case, I get:

X_1 = (4.517-a)/b

X_2 = (-0.9237-a)/b

X_3 = (2.6645-a)/b


And, as b>0, the middle one is then X_2.

Is this correct?

Thanks for any help!
 
Physics news on Phys.org
  • #2


Hi there,
Yes, your solution for part (i) is correct.

For part (ii), you are on the right track. Yes, you generate three random numbers using the given sequence and then pick the middle one. So in this case, the middle one would be X_2. However, I think there is a mistake in your calculations for X_1 and X_2. It should be:

X_1 = (4.517 - a)/b
X_2 = (2.6645 - a)/b
X_3 = (-0.9237 - a)/b

Then, the middle one would be X_1.

I hope this helps!
 

FAQ: Random Number Generation - What is the 'middle one of three'?

What is random number generation?

Random number generation is a process in which numbers are generated without any pattern or predictability. This is commonly used in fields such as statistics, cryptography, and gaming.

How does random number generation work?

Random number generation can be done through various methods, such as physical processes (such as rolling dice or flipping coins), mathematical algorithms, or computer programs. The goal is to produce numbers that are as unbiased and unpredictable as possible.

What is the "middle one of three" in random number generation?

The "middle one of three" refers to a method of selecting a random number from a set of three numbers. It involves generating three random numbers and then choosing the middle number as the result.

Why is the "middle one of three" method used in random number generation?

The "middle one of three" method is used in random number generation because it helps to reduce bias and increase randomness. By choosing the middle number from a set of three, it eliminates the possibility of choosing the highest or lowest number more frequently.

Are there other methods of random number generation besides the "middle one of three"?

Yes, there are many other methods of random number generation, such as linear congruential generators, Mersenne Twister, and cryptographic random number generators. Each method has its own advantages and disadvantages, and the choice of method depends on the specific application and level of randomness required.

Similar threads

Back
Top