DEV Community

Cover image for Random Variables: A Glimpse
Ashwin Sharma P
Ashwin Sharma P

Posted on • Originally published at aiwithash.data.blog

4 1

Random Variables: A Glimpse

So, what are actually random variables?

In statistics, a random variable is a variable whose outcome is based on some random phenomenon.

These random variables are classified into discrete random variables and continuous random variables.

Discrete Random Variables:- They are the random variables which take up a finite number of values. It usually takes up a whole number value.

Discrete Random Variable

Let’s consider an example.

Suppose we are tossing 3 unbiased coins. The sample space ‘S’, i.e. the whole set of outcome possibilities is;

S={HHH,HHT,HTH,THH,HTT,THT,TTH,TTT}, where H denotes head and T denotes tail.

So if we check the possible number of heads in each toss, the random variable ‘X’ can be denoted as;

X={0,1,2,3}

Here we can see that the random variable takes up the values 0,1,2,3 which are discrete values.

Continuous Random Variable:- A random variable becomes a continuous random variable if it takes up any number of values inside a particular interval.

Continuous Random Variable

For example; suppose we consider the weights of students in a school. The weights may vary over a range and if we consider a particular range inside the whole set, the random variables will take up any value (indefinite number of values). Hence there is no discrete observation in a continuous random variable.

So that’s it about random variables.

Sentry image

Hands-on debugging session: instrument, monitor, and fix

Join Lazar for a hands-on session where you’ll build it, break it, debug it, and fix it. You’ll set up Sentry, track errors, use Session Replay and Tracing, and leverage some good ol’ AI to find and fix issues fast.

RSVP here →

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay