Meaning of iid random variables (plural)

AI Thread Summary
The discussion clarifies the distinction between random numbers and random variables, emphasizing that a random variable represents a quantity that can change, while a number is static. The term "random number" is often misleading; it refers to numbers selected from a distribution, not inherently random themselves. The R function "dbinom(40:60, 100, 0.5)" calculates probabilities for specific outcomes in a binomial distribution, rather than generating random numbers. To generate random samples from a binomial distribution, the command "a<-rbinom(25,100,.5)" is recommended, which simulates the results of repeated experiments. Overall, random variables embody the concept behind numerical results, while the generated numbers are specific outcomes from those variables.
Sumanta
Messages
25
Reaction score
0
Hello,

Can somebody pls explain to me what is the difference between generating random numbers and random variables. The confusion is mainly because most of the time texts write that for n (iid) random variables in the limiting sense reaches the expectation of the first random variable.

I am trying to use R and used the function dbinom(40:60, 100, 0.5). Now the numbers that are generated are what? Are all the numbers random variables.

- Thanks.

Sumanta
 
Physics news on Phys.org
Well, first, numbers are not variables! A variable means a quantity that may change. A number never changes.

The difficulty may be the misleading term "random number". A single number is NEVER "random". What we mean when we talk about random numbers are randomly selected numbers.

I have no idea what "dbinom(40:60, 100, 0.5)" means or what it returns. What is its definition?
 
The term "random numbers" refers to a special class of random variables, namely those which have a distribution uniform in the interval [0,1]. In other words with a probability density function f(x), where f(x) = 0 outside the interval [0,1] and f(x) = 1 inside [0,1].

The term is widely used in Monte Carlo computer simulations, where "psuedo-random numbers" refer to machine generated sequences of numbers which look like (statistically) random numbers.
 
The command " dbinom(40:60, 100, 0.5)" will return a string containing P(X = i) for each i \in 40, 41, \dots, 60, calculated using the binomial distribution with n = 100, p = 0.5. These are not random numbers, they are probabilities.

You can use R to generate random numbers from any distribution. Picking on the binomial distribution (since you referred to it), consider the following setup.

* We are interested generating a random sample of values from a binomial distribution with n = 100, p = .5
* We want to generate a random sample of 25 values from this distribution.

Here is the appropriate R command (I'm storing the numbers in the R variable named a)

a<-rbinom(25,100,.5)

Here is the result I just obtained from my copy of R

44 57 47 44 41 52 47 46 45 51 52 56 48 46 53 54 40 43 54 56 42 48 43 47 54

What might these represent? Think of flipping a fair coin 100 times, and counting the number of heads that occur. These numbers represent results we might see from 25 repetitions of this experiment: the first set of flips gives 44 Heads, the second set gives 57 heads, and so on. THESE are random numbers generated from this particular binomial distribution.

As an incredibly non-mathematical description of random variables, think this way: a random variable is the IDEA behind the numerical results of an experiment. In my coin experiment, the random variable is "the number of heads that occur when a fair coin is flipped 100 times". The 25 numbers generated represent the act of measuring this random variable 25 times.

Does this help?
 
I was reading documentation about the soundness and completeness of logic formal systems. Consider the following $$\vdash_S \phi$$ where ##S## is the proof-system making part the formal system and ##\phi## is a wff (well formed formula) of the formal language. Note the blank on left of the turnstile symbol ##\vdash_S##, as far as I can tell it actually represents the empty set. So what does it mean ? I guess it actually means ##\phi## is a theorem of the formal system, i.e. there is a...

Similar threads

Replies
10
Views
2K
Replies
3
Views
1K
Replies
4
Views
2K
Replies
5
Views
4K
Replies
4
Views
2K
Replies
1
Views
2K
Replies
7
Views
2K
Back
Top