Histogram

Histograms are used to depict:

  • the relative frequencies
  • absolute frequencies or
  • density of a variable
* Histograms
sysuse auto, clear

// Default histogram displays density, underlying variable is assumed to be continuous
histogram price
// Abbreviated 
hist price 

// Display absolute frequencies 
hist price, frequency
// Display relative frequencies 
hist price, fraction
// Set bin width and start value of first bin 
hist price, fraction width(1000) start(500) title("Relative frequencies of price")
// Set number of bins and start value of first bin
hist price, fraction bin(100) start(500) title("Relative frequencies of price")