CS 100 (Learn)CS 100 (Web)Module 01


Discretization (part one)

(direct YouTube link)

NOTE: If your internet access is restricted and you do not have access to YouTube, we have provided alternate video links.

TRANSCRIPT

We are surrounded by continuous quantities, but it's human nature to think about continuous quantities as if they are discrete. This is known as discretization and is the topic of this video.

Most natural phenomena are continuous quantities: time, temperature, distance, mass.

Let's look at a practical example: What is your height?

Let's pretend that you're filling out your online dating profile and it asks you for your height in centimeters (because it's a Canadian website).

So you ask your friend to measure you, and they use their fancy measuring tape which can measure millimeters. They say your height is one hundred and sixty-two point eight centimeters [162.8cm] which, if you prefer imperial measurements, is about five foot four [5'4"] and the average height of a Canadian woman.

So what height will you put on your profile? Now, I know what you're thinking -- most people lie about their height on dating websites -- but let's assume that you want to be honest.

How accurate do you want to be? You can leave it as one hundred and sixty-two point eight centimeters [162.8cm] -- that may signal to your potential matches that you're not the type of person to exaggerate or round up. But really, nobody would blame you for rounding it up to one hundred and sixty-three centimeters [163cm] because an integer looks nicer.

But are you really exactly one hundred and sixty-two point eight centimeters [162.8cm] tall?

Remember, your height is a measure of physical distance and is a continuous quantity, and so there are likely an infinite number of digits after the decimal place.

Let's say that your friend works at the Canadian Space Agency and has a super-duper-laser-precise height measuring device and can measure your height to be one hundred and sixty-two point eight one five nine three three four four six centimeters [162.815933446cm].

If you put that height on your profile you're probably signaling to potential matches "I have issues" or more likely... "don't date me".

Furthermore, it's impossible to put your true height with infinite precision on the website because it would take an infinite amount of time to fill out your profile and then you'll just die alone.

Before we move on, a scientist may tell you that at the atomic or quantum level, your height and other physical quantities of space and time may not be continuous, but that is an advanced topic well beyond the scope of this course.

So what did your friend do when they measured your height as one hundred and sixty-two point eight centimeters [162.8cm]? They rounded your height to the nearest millimeter, or in more technical terms, they discretized your height.

A measuring tape is a great example of how to discretize a continuous quantity.

Every day we discretize continuous quantities and rely on others to discretize for us. You don't care if it's twenty two point four three three five [22.4335] degrees out -- you just want to know if you need to wear a jacket or not.

If someone asks you the time, and the clock says it's two fifty-eight and five seconds, you say it's "three o'clock" because you intuitively understand that they want a nice, round value.

This is literally "human nature". When we look at a number we inherently only concern ourselves with a few of the most significant digits and ignore the insignificant details. If we didn't do this, we would be frequently crippled with analysis paralysis and get bogged down in unnecessary detail.

By the way, businesses totally take advantage of this behaviour: they price things as "nineteen ninety-five" [$19.95] instead of "twenty dollars" [$20.00] to trick us.

So to summarize, discretization is when a continuous quantity is converted to a discrete quantity with an appropriate level of precision. Humans naturally discretize quantities because it is practical and convenient.