What is the difference between a Frequency distribution and Dictionary?

I am curious to know if there is any difference between frequency distributions and dictionary or if they refer to the same thing, thank you!

They are two completely different things.

Frequency distribution : Frequency distribution is a representation, either in a graphical or tabular format, that displays the number of observations within a given interval.

Consider below example from titanic dataset

image

or below plots from football dataset:

image

Dictionary -> Dictionary in Python is an unordered collection of data values, used to store data values like a map, which unlike other Data Types that hold only single value as an element, Dictionary holds key:value pair. Key value is provided in the dictionary to make it more optimized.

image

2 Likes

A dictionary is a type of data structure that stores data in a particular format - as key: value pairs.

sample_dict = {"name1": marks1, "name2": marks2, "name3": marks3}

The above is a dictionary, which stores the names of 3 students and their marks/grades in a particular subject. That’s the most basic example of a dictionary.

A frequency distribution is just a way to store the frequency of a particular item in some data. The frequency refers to how many times that item appears in that data.

The frequency distribution can be a dictionary, but it doesn’t necessarily have to be one. It’s just easier to store (and later extract) that information in a dictionary because of the key:value pair structure.

2 Likes

Thank you very much for simplifying this. I especially liked the last sentence.

1 Like

Thank you for your great reply Vasheyy!