count 234.000000
mean 1.588761
std 1.879657
min 0.050000
25% 0.120000
50% 0.390000
75% 2.480000
max 5.330000
Name: fed, dtype: float64
Distribution Plots
In order to learn more about the distribution of this data, we can create distribution plots, to tell a story about the summary statistics.
A box plot:
import plotly.express as px# https://plotly.com/python-api-reference/generated/plotly.express.box.htmlpx.box(df, x="fed", orientation="h", points="all", title="Distribution of Federal Funds Rate (Monthly)", hover_data=["timestamp"])
A violin plot:
# https://plotly.com/python-api-reference/generated/plotly.express.violin.htmlpx.violin(df, x="fed", orientation="h", points="all", box=True, title="Distribution of Federal Funds Rate (Monthly)", hover_data=["timestamp"])
A histogram:
# https://plotly.com/python-api-reference/generated/plotly.express.histogram.htmlpx.histogram(df, x="fed", #nbins=12, title="Distribution of Federal Funds Rate (Monthly)", height=350)
When we make a histogram, we can specify the number of bins, using the nbins parameter.
These charts help us visually identify distributions in the data.
Based on this view, is hard to say for sure if this data is normally distributed, or multi-modal, or whether it is too skewed by the outliers. In the next chapter, we will perform more official statistical tests to determine if this data is normally distributed.