How to know the SalePrice column is continuous and measured on an interval scale

Screen Link:
https://app.dataquest.io/m/305/the-mean/6/introducing-the-data

My Code:

import pandas as pd
houses = pd.read_table("AmesHousing_1.txt")

one = True

above_mean = houses[houses["SalePrice"] > houses["SalePrice"].mean()]["SalePrice"].count()
below_mean = houses[houses["SalePrice"] < houses["SalePrice"].mean()]["SalePrice"].count()

What I expected to happen:

What actually happened:

Replace this line with the output/error

In this mission, we have been asked to read, explore and understand the data set to answer below question-
The SalePrice column is continuous and measured on an interval scale. (If you think this is true, assign the boolean True to the variable two , otherwise assign False .)

M not able to get How to answer this,

I mean what should i think and how should i calculate,
I calculated mean of sale price and find diff of houses from mean price
I knew this question is very naive, but it is very important for me, I want to learn and understand this

1 Like

Hi @vinodgchandaliya

Remember that a variable is continuous when you can’t count it, like age or time. Right now where i live it’s 00 h 51 min 20 sec 4 miliseconds, 8 nanoseconds etc etc

Meanwhile a discrete variable is a variable that it’s finite, like the amount of your bank account

Said that, a way to know if a variable is continuous or discrete is this

  • Think about how long would it take to count the possible values for the variable, if you can count the values then is discrete, if you can’t then it’s continuous

Similar happens with the scale. You need to look the data and find if there are intervals or not

Hope it helps you to make it clearer
Good luck

1 Like

@alegiraldo666 thank you for taking time and explaining this, From this I can say Sale Price is neither continuous nor interval based,

I think for the mean calculation was also not needed, we can say directly by looking at frequency of data
:slight_smile: :innocent: