# Random Variables

A key component of the theory of probability is the concept of random variables, which are functions that assign real numbers to each possible outcome of a random phenomenon. For instance, in the context of rolling a six-sided die, the values of the random variable could be represented by integers 1 through 6, each corresponding to one of the possible outcomes of the roll. Or the temperature on any given day can be considered a random variable because it depends on various unpredictable factors. In other words, a random variable is a function that maps from sample space to real numbers.&#x20;

**Daily Life Example**:

* **Coin Toss Outcome**: Let $$X$$ be a random variable representing the outcome of a coin toss, where $$X=1$$for heads and $$X=0$$ for tails. Here, $$X$$ is a random variable because its value is determined by a random process (the coin toss).

**Biology Example**:

* **Presence of a Genetic Marker**: Let $$Y$$ be a random variable representing the presence (1) or absence (0) of a particular genetic marker in an individual. The value of $$Y$$ is determined by a random genetic process.

We consider discrete and continuous random variables separately.&#x20;

### Discrete Random Variables

Discrete random variables represent outcomes that can be counted or enumerated, often taking on integer values. Examples include the outcomes of rolling a die or the number of heads obtained in a series of coin flips.

**Daily Life Example**:

* **Number of Emails Received**: Let $$X$$ be the number of emails you receive in a day. Possible values of $$X$$ are $$0, 1, 2, 3$$, and so on, making it a discrete random variable.

**Biology Example**:

* **Number of Offspring**: Let $$Y$$ be the number of offspring produced by a particular organism. The possible values are countable integers $$(e.g., 0, 1, 2, 3)$$.

### Continuous Random Variables

Continuous random variables are characterized by outcomes that can take on any value within a certain range, typically over an interval of real numbers. Common examples of continuous random variables include measurements such as height, weight, or time intervals.

**Daily Life Example**:

* **Daily Rainfall**: Let $$X$$ be the amount of rainfall in a day measured in millimeters. Since rainfall can take any non-negative value within a continuous range, $$X$$ is a continuous random variable.

**Biology Example**:

* **Blood Glucose Levels**: Let $$Y$$ be the blood glucose level of an individual measured in mg/dL. Since blood glucose can vary continuously, Y a continuous random variable.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://edu.abi.am/statistics-theory/random-variables.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
