Meaning of iid random variables (plural)

Click For Summary

Discussion Overview

The discussion revolves around the distinction between random numbers and random variables, particularly in the context of generating random samples using R programming. Participants explore the implications of using iid random variables and the interpretation of outputs from specific R functions related to probability distributions.

Discussion Character

  • Conceptual clarification
  • Technical explanation
  • Debate/contested

Main Points Raised

  • One participant questions the difference between generating random numbers and random variables, expressing confusion over the terminology used in texts regarding iid random variables and their expectations.
  • Another participant asserts that numbers are not variables, emphasizing that a variable represents a quantity that may change, while a number is static. They express uncertainty about the R function "dbinom(40:60, 100, 0.5)" and its output.
  • A different participant clarifies that "random numbers" can refer to a specific class of random variables with a uniform distribution in the interval [0,1], particularly in the context of Monte Carlo simulations.
  • One participant explains that the command "dbinom(40:60, 100, 0.5)" returns probabilities for specific outcomes of a binomial distribution, not random numbers. They provide an example of generating random numbers from a binomial distribution using the R function "rbinom" and relate it to a coin-flipping experiment.
  • They describe random variables as the conceptual framework behind numerical results from experiments, contrasting this with the actual numerical outputs generated from those experiments.

Areas of Agreement / Disagreement

Participants express differing views on the definitions and implications of random numbers versus random variables. There is no consensus on the terminology or the interpretation of the R functions discussed, indicating ongoing debate and uncertainty.

Contextual Notes

Some participants may have different interpretations of the terms "random numbers" and "random variables," leading to potential misunderstandings. The discussion also highlights the need for clarity regarding the outputs of specific R functions and their meanings in statistical contexts.

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 [tex]P(X = i)[/tex] for each [tex]i \in 40, 41, \dots, 60[/tex], calculated using the binomial distribution with [tex]n = 100, p = 0.5[/tex]. 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?
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 10 ·
Replies
10
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 16 ·
Replies
16
Views
3K
  • · Replies 3 ·
Replies
3
Views
928
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 5 ·
Replies
5
Views
4K
  • · Replies 8 ·
Replies
8
Views
2K