Statistics Data Types
Language: Statistics
observations = {
"eye_color": "brown", # nominal - categories, no order
"satisfaction": "good", # ordinal - categories, has order
"num_pets": 2, # discrete - countable whole number
"height_cm": 172.5 # continuous - any value in a range
}
data_types = {
"eye_color": "categorical (nominal)",
"satisfaction": "categorical (ordinal)",
"num_pets": "numerical (discrete)",
"height_cm": "numerical (continuous)"
}
for key, value in observations.items():
print(f"{key} = {value} -> {data_types[key]}")Output
Click Run to execute this code.