Course Content

# Probability Theory Basics

5. Covariance and Correlation

Probability Theory Basics

## Continuous Uniform Distribution

**Continuous distribution** describes the stochastic experiment with **infinite** possible outcomes.

## Continuous uniform distribution

**Continuous uniform distribution** describes an experiment where all outcomes within the interval have an **equal probability of occurring**.

If the variable is uniformly distributed, we can use a **geometrical approach** to calculate probabilities.

## Example

Consider a line segment of length `10`

units. What is the probability of randomly selecting a point on the line segment such that the distance from the starting point to this point is between `3 and 7`

units?

As a result, the position or the point is uniformly distributed on the line with length `10`

.

We can simply divide the length of the desired interval by the whole length of the segment.

We can also use the `.cdf()`

method on the `scipy.stats.uniform`

class to calculate the corresponding probability:

The first parameter of the `.cdf()`

method determines the point at which we calculate probability; `loc`

parameter determines the beginning of the segment, and `scale`

determines the length of the segment.

The `.cdf()`

method calculates the probability that an experiment's result falls into a certain interval: `.cdf(interval_end) - .cdf(interval_start)`

.

We will consider this method in more detail in Probability Theory Mastering course.

Everything was clear?