Analysis Types

Histogram: Definition, Examples, Types, and Interpretation

Table of Contents

A histogram is a graph that shows the distribution of numerical data by grouping observations into intervals called bins. Each bar covers a numerical interval, and its area represents the frequency, relative frequency, or density of observations in that interval. Histograms help reveal a distribution’s shape, centre, spread, gaps, and unusual values.

Histogram

Introduction

A list of numerical observations may contain useful patterns that are difficult to detect by reading the values individually. A histogram transforms those observations into a visual summary.

Researchers use histograms to examine measurements such as age, reaction time, household income, blood pressure, examination scores, laboratory results, and response duration. The graph can show whether values cluster near a centre, spread widely, form multiple groups, or extend into a long tail.

This article explains:

  • What a histogram is and how it works.
  • How to construct one from raw data.
  • How bins and class intervals affect its appearance.
  • How to interpret common histogram shapes.
  • How a histogram differs from a bar chart.
  • How histograms are used and reported in academic research.
  • How to create them with Excel, Google Sheets, SPSS, R, and Python.

Key takeaways

  • A histogram displays the distribution of a quantitative variable.
  • Numerical observations are grouped into consecutive, non-overlapping bins.
  • With equal-width bins, bar height can represent frequency; with unequal widths, frequency density should normally determine height.
  • Bin width and starting position can substantially change the graph’s appearance.
  • A histogram can suggest distributional features, but it cannot by itself prove normality or identify causation.

What Is a Histogram?

A histogram is a graphical representation of the frequency distribution of quantitative data. The horizontal axis is divided into numerical intervals, while the vertical axis shows count, proportion, percentage, or density.

For example, a researcher could group participants’ ages into the intervals 18–24, 25–31, 32–38, and 39–45. The bar over each interval would indicate how many participants fall within that age range.

The intervals in a histogram must be:

  • Numerical.
  • Mutually exclusive.
  • Consecutive.
  • Collectively broad enough to cover the displayed data range.

Histograms are primarily used for continuous variables, such as height or time. They may also be used for grouped discrete numerical variables when intervals are meaningful. For a small set of separate integer values, however, a dot plot or bar chart is often clearer.

What Does a Histogram Show?

A histogram shows how observations are distributed across the numerical range of a variable.

It can help a reader identify:

  • Shape: Whether the distribution is symmetric, skewed, uniform, unimodal, or multimodal.
  • Centre: The region in which observations appear to cluster.
  • Spread: How widely the values extend.
  • Modes: Intervals containing local peaks.
  • Gaps: Intervals containing few or no observations.
  • Tails: Areas where frequencies gradually decrease.
  • Possible outliers: Values separated from most of the distribution.
  • Data-quality problems: Rounding, censoring, impossible values, or combined populations.

A histogram gives an approximate visual summary. It normally does not display the exact value of each observation.

Main Parts of a Histogram

Title

The title should identify the variable and, where relevant, the population or sample.

Example:

Distribution of Response Times Among Survey Participants

Horizontal axis

The horizontal or x-axis shows the values of the quantitative variable. It is divided into bins or class intervals.

Examples include:

  • Age in years.
  • Reaction time in milliseconds.
  • Income in US dollars.
  • Temperature in degrees Celsius.
  • Examination score as a percentage.

Vertical axis

The vertical or y-axis may show:

  • Frequency or count.
  • Relative frequency.
  • Percentage.
  • Frequency density.
  • Probability density.
  • Cumulative frequency, in a less common cumulative histogram.

The axis label must state which scale is being used.

Bins

A bin is a numerical interval used to group observations. For example:

  • 10 to less than 20.
  • 20 to less than 30.
  • 30 to less than 40.

Bins are also called classes, buckets, or class intervals.

Bars

Each bar covers one bin. In a correctly constructed histogram, the area of the bar corresponds to the amount of data in that interval.

When every bin has the same width, bar height is directly proportional to frequency. When widths differ, using frequency alone as height can be misleading.

How Does a Histogram Work?

Creating a histogram involves two operations:

  1. Divide the numerical scale into intervals.
  2. Count how many observations fall within each interval.

Suppose a researcher records 24 task-completion times, measured in seconds:

12, 14, 15, 15, 16, 18, 18, 19, 21, 22, 23, 24, 24, 25, 27, 29, 31, 33, 34, 35, 38, 42, 47, 58

Using bins of width 10 gives the following grouped frequency distribution:

Completion time in secondsFrequencyRelative frequency
10 to less than 2080.333
20 to less than 3080.333
30 to less than 4050.208
40 to less than 5020.083
50 to less than 6010.042
Total241.000

The first two bars would have equal heights because each contains eight observations. The bars would then become progressively shorter toward the right.

This pattern suggests a right-skewed distribution: most observations are below 40 seconds, while a smaller number extend toward higher values.

How to Make a Histogram Step by Step

Step 1: Confirm that the variable is quantitative

Histograms are designed for numerical variables where differences between values are meaningful.

Appropriate examples:

  • Height.
  • Weight.
  • Age.
  • Test score.
  • Waiting time.
  • Concentration level.

Inappropriate examples:

Categorical variables should normally be displayed with a bar chart.

Step 2: Inspect and clean the data

Before plotting:

  • Check for impossible values.
  • Identify missing observations.
  • Verify units.
  • Confirm that decimal separators were imported correctly.
  • Determine whether values were rounded or censored.
  • Decide whether weights should be applied.
  • Document any exclusions.

A histogram created from uncleaned data may reveal errors, but it can also reproduce them without warning.

Step 3: Find the data range

The range covered by the data is:

[
\text{Range} = \text{Maximum} – \text{Minimum}
]

For the completion-time example:

[
58 – 12 = 46
]

Step 4: Choose a starting point and bin width

A bin width of 10 seconds produces the intervals:

  • ([10,20))
  • ([20,30))
  • ([30,40))
  • ([40,50))
  • ([50,60))

The notation ([10,20)) means that 10 is included but 20 is excluded.

An observation equal to 20 would therefore go into the next interval, ([20,30)).

Different software may use slightly different boundary conventions, particularly for the final bin. Check the documentation when exact allocation matters.

Step 5: Count observations in each bin

Count how many values satisfy each interval definition.

The frequencies should add up to the number of valid observations included in the graph.

Step 6: Draw and label the axes

Place the numerical intervals on the horizontal axis and the selected frequency scale on the vertical axis.

Include measurement units.

Step 7: Draw the bars

For equal-width intervals, bar heights may show frequency, relative frequency, or percentage.

Adjacent bins are normally drawn without arbitrary spaces because the numerical scale is continuous. An empty interval may nevertheless appear as a genuine zero-frequency gap.

Step 8: Evaluate alternative bins

Recreate the graph with at least one narrower and one wider bin width. Important conclusions should not depend entirely on one arbitrary setting.

Step 9: Interpret the graph in context

Describe the distribution’s shape, approximate centre, spread, and unusual features. Connect those observations to the variable being studied.

Histogram Formulas

Frequency

The frequency for bin (j) is:

[
f_j = \text{number of observations in bin } j
]

Relative frequency

If the sample contains (n) valid observations:

[
r_j = \frac{f_j}{n}
]

For the 10–20 second interval:

[
r_j = \frac{8}{24} = 0.333
]

Approximately 33.3% of observations fall in that interval.

Percentage frequency

[
p_j = \frac{f_j}{n} \times 100
]

For the same interval:

[
p_j = \frac{8}{24} \times 100 = 33.3%
]

Frequency density

For a bin with width (w_j):

[
d_j = \frac{f_j}{w_j}
]

This scale is particularly important when bins have unequal widths.

Relative-frequency density

[
d_j^{(r)} = \frac{f_j}{n w_j}
]

When relative-frequency density is used, the total area of the histogram equals 1.

Why Does Area Matter in a Histogram?

The defining quantitative feature of a histogram is the relationship between bar area and frequency.

For equal-width bins:

[
\text{Area} = \text{Width} \times \text{Height}
]

Because every width is identical, comparing heights also compares areas and frequencies.

For unequal-width bins, however, a wider bar naturally has more area. Its height must be adjusted so the area remains proportional to the frequency.

Unequal-width example

Suppose two intervals contain:

IntervalWidthFrequencyFrequency density
0–1010202.0
10–3020301.5

If raw frequency were used as height, the second bar would appear higher because it contains 30 observations.

Using frequency density shows that observations are actually more concentrated in the first interval:

[
20 \div 10 = 2.0
]

[
30 \div 20 = 1.5
]

The bar areas are:

[
10 \times 2.0 = 20
]

[
20 \times 1.5 = 30
]

Thus, area correctly represents frequency.

Types of Histograms

The phrase “types of histograms” is used in two different ways. One classification describes the vertical scale, while another describes the shape of the distribution. These should not be mixed.

Frequency histogram

A frequency histogram uses the number of observations in each bin.

It is easy to interpret when:

  • The bins have equal widths.
  • Only one sample is being examined.
  • The audience needs actual counts.

Relative-frequency histogram

A relative-frequency histogram shows the proportion of valid observations in each interval.

It is useful when comparing samples of different sizes because all samples are placed on a common proportional scale.

Percentage histogram

A percentage histogram is a relative-frequency histogram multiplied by 100.

It may be easier for non-technical audiences to understand.

Density histogram

A density histogram scales bar height so that the total bar area equals 1.

It is appropriate when:

  • Bins have unequal widths.
  • A probability-density curve will be overlaid.
  • The histogram is being treated as an estimate of an underlying probability distribution.

A density value can be greater than 1. This is not an error because density is not the same as probability. Probabilities correspond to areas over intervals.

Cumulative histogram

A cumulative histogram displays the accumulated frequency or proportion up to each interval.

Although possible, an ogive or empirical cumulative distribution function is often more conventional and easier to interpret for cumulative information.

Weighted histogram

In a weighted histogram, each observation contributes a specified weight rather than one equal count.

Weighted histograms may be required for:

  • Complex survey samples.
  • Population estimates.
  • Unequal sampling probabilities.
  • Aggregated records.

The y-axis and caption should state that weights were applied.

Common Histogram Shapes

Symmetric distribution

A distribution is approximately symmetric when the left and right sides have similar shapes around a central region.

Symmetry does not automatically mean that the data follow a normal distribution. Uniform, short-tailed, long-tailed, and multimodal distributions can also be symmetric.

Bell-shaped or approximately normal distribution

A bell-shaped histogram has:

  • One central peak.
  • Approximate symmetry.
  • Frequencies that gradually decline toward both tails.

A visual resemblance to a bell curve is not sufficient to prove normality.

Right-skewed distribution

A right-skewed or positively skewed distribution has a longer tail extending toward larger values.

Examples may include:

  • Income.
  • Waiting time.
  • Hospital length of stay.
  • Website session duration.
  • Time required to complete a difficult task.

Most observations may cluster at lower values while a smaller number are unusually large.

Left-skewed distribution

A left-skewed or negatively skewed distribution has a longer tail toward smaller values.

Examples may include:

  • Scores on an easy examination.
  • Customer ratings when most respondents choose high values.
  • Measurements constrained by an upper limit.

Uniform distribution

In an approximately uniform histogram, intervals have broadly similar frequencies.

A flat appearance may represent the underlying process, but it can also result from:

  • Very broad bins.
  • A small sample.
  • Artificial data generation.
  • The combination of several processes.

Bimodal distribution

A bimodal histogram has two visible peaks.

Possible explanations include:

  • Two subpopulations.
  • Two experimental conditions.
  • Different measurement procedures.
  • Morning and evening activity patterns.
  • A process that changed during data collection.

Bimodality should prompt researchers to examine group membership and data provenance rather than merely label the shape.

Multimodal distribution

A multimodal histogram contains more than two peaks. It may indicate multiple underlying groups, repeated cycles, rounding patterns, or a binning artefact.

Gaps

A gap is an interval with no or very few observations.

It may reflect:

  • Genuine separation between groups.
  • An impossible range.
  • Censoring.
  • Data-entry problems.
  • Small sample size.

Isolated bars and possible outliers

A low bar separated from the main distribution may contain one or more unusual observations.

A histogram does not identify the exact observation, and an isolated bar is not automatically evidence that the value should be removed.

How to Interpret a Histogram

A useful interpretation follows a consistent sequence.

1. Identify the variable and units

Begin by stating what is measured.

Example:

The histogram displays participant response times in seconds.

2. Describe the overall shape

State whether the distribution appears:

  • Symmetric or asymmetric.
  • Unimodal, bimodal, or multimodal.
  • Approximately uniform.
  • Right-skewed or left-skewed.

Use cautious wording such as “appears,” “approximately,” and “suggests.”

3. Locate the centre

Identify the interval around which observations cluster.

A histogram normally supports an approximate visual description rather than an exact mean or median.

4. Describe the spread

Report the approximate displayed range and whether observations are tightly concentrated or widely dispersed.

For a precise summary, supplement the histogram with statistics such as:

  • Standard deviation.
  • Interquartile range.
  • Minimum and maximum.
  • Quantiles.

5. Identify unusual features

Look for:

  • Gaps.
  • Long tails.
  • Multiple peaks.
  • Isolated intervals.
  • Sharp cut-offs.
  • Rounding or heaping.
  • Boundary effects.

6. Consider the bins

Ask whether the pattern remains visible with reasonable alternative bin widths and starting points.

7. Interpret in context

Connect the graphical pattern to the research question.

Example:

Response times were concentrated between 10 and 30 seconds, with progressively fewer observations at longer durations. The right tail suggests that a small group of participants required substantially more time than the majority.

How Many Bins Should a Histogram Have?

There is no universally correct number of bins for every dataset. The choice depends on sample size, variability, distribution shape, measurement precision, and the purpose of the graph.

Too few bins can hide:

  • Skewness.
  • Multiple peaks.
  • Gaps.
  • Outliers.
  • Data-quality patterns.

Too many bins can create:

  • Visual noise.
  • Empty intervals.
  • Unstable peaks.
  • An exaggerated impression of irregularity.

Square-root rule

A simple approximation is:

[
k \approx \sqrt{n}
]

where (k) is the number of bins and (n) is the sample size.

This rule is easy to apply but does not use information about spread or skewness.

Sturges’ rule

[
k = \lceil 1 + \log_2(n) \rceil
]

An equivalent approximation is:

[
k = \lceil 1 + 3.322\log_{10}(n) \rceil
]

Sturges’ rule is common in introductory texts and software but may produce too few bins for large or strongly non-normal datasets.

Scott’s rule

Scott’s normal-reference rule estimates bin width as:

[
h = 3.5s n^{-1/3}
]

where:

  • (h) is bin width.
  • (s) is the sample standard deviation.
  • (n) is sample size.

The rule is motivated by minimising statistical error under a normal-reference model (Scott, 1979).

Freedman–Diaconis rule

[
h = 2 \times IQR \times n^{-1/3}
]

where (IQR) is the interquartile range.

Because the interquartile range is less sensitive to extreme observations than the standard deviation, this rule is often useful for skewed or heavy-tailed data (Freedman & Diaconis, 1981).

Practical recommendation

For exploratory analysis:

  1. Start with a defensible automatic rule such as Freedman–Diaconis or Scott.
  2. Inspect the graph.
  3. Try moderately narrower and wider bins.
  4. Check whether important conclusions remain stable.
  5. Use understandable boundaries when communication is more important than strict optimisation.
  6. Report the selected width or method in formal research when the choice affects interpretation.

A formula provides a starting point, not an unquestionable answer.

Does the Starting Point Matter?

Yes. Two histograms can use the same bin width but different starting points.

For example:

  • 0–10, 10–20, 20–30.
  • 5–15, 15–25, 25–35.

Observations near the boundaries will be grouped differently. A peak may become more or less visible even though the raw data have not changed.

Researchers should check both width and alignment when a substantive conclusion depends on the apparent shape.

Why Do Histogram Bars Touch?

Histogram bars normally touch because adjacent bins represent consecutive sections of a numerical scale.

For example, the intervals 10–20 and 20–30 meet at a shared boundary. A decorative gap could incorrectly imply that an unrepresented numerical region exists between them.

However, a histogram may contain a visible blank interval when no observations fall within a legitimate bin. That is a data gap, not merely spacing added for design.

Histogram vs Bar Chart

A histogram and a bar chart both use rectangular bars, but they represent different structures.

FeatureHistogramBar chart
Main purposeShow the distribution of numerical dataCompare categories
Horizontal axisNumerical intervalsCategory labels
OrderDetermined by the numerical scaleMay often be rearranged
Bar widthRepresents interval widthUsually has no quantitative meaning
Bar areaRepresents frequency or relative amountUsually not interpreted quantitatively
GapsNormally none between adjacent non-empty binsCommonly used between categories
Typical dataQuantitativeCategorical
Main questionHow are values distributed?How do categories compare?

Example

A histogram could show the distribution of student ages from 18 to 40.

A bar chart could show the number of students enrolled in biology, chemistry, physics, and mathematics.

Turning department names into numerical codes does not make them suitable for a histogram because the codes do not form a meaningful quantitative scale.

Histogram vs Density Plot

A density plot estimates a smooth probability-density curve rather than displaying rectangular bins.

HistogramDensity plot
Depends on bin width and originDepends on bandwidth and kernel
Shows grouped counts or densityShows a smoothed density estimate
Can display actual frequenciesUsually normalised to area 1
Easy for general audiencesUseful for comparing smooth shapes
May appear irregular with many binsMay hide features through excessive smoothing

A density plot is not automatically more accurate. Its appearance depends on a smoothing parameter just as a histogram depends on bin width.

Histogram vs Box Plot

A histogram provides detailed information about distribution shape. A box plot provides a compact summary based on the median, quartiles, and possible outliers.

Use a histogram when shape and modality matter. Use a box plot when several groups must be compared efficiently.

The two graphs are often complementary.

Histogram vs Dot Plot

A dot plot shows individual observations and works well for small or moderate samples.

A histogram is more compact when many observations make individual dots difficult to read.

Histogram vs Frequency Polygon

A frequency polygon connects points representing class frequencies, often at bin midpoints.

It can be useful for comparing distributions, but the class boundaries and represented areas may be less immediately visible than in a histogram.

When Should You Use a Histogram?

Use a histogram when:

  • The variable is quantitative.
  • You need to examine a distribution.
  • The sample is large enough for grouping to be informative.
  • Shape, spread, tails, gaps, or modality are relevant.
  • You are conducting exploratory data analysis.
  • You need to inspect model residuals or simulation results.
  • You want to compare the observed distribution with a theoretical density.

When Should You Avoid a Histogram?

Consider another graph when:

  • The variable is categorical.
  • The sample is very small.
  • Individual values must remain visible.
  • Exact ranks or cumulative proportions are needed.
  • Many groups must be compared simultaneously.
  • The data span several orders of magnitude without transformation.
  • The distribution is extremely sensitive to arbitrary bins.
  • The variable is ordinal but numerical distances are not meaningful.

Possible alternatives include a dot plot, box plot, violin plot, empirical cumulative distribution function, or bar chart.

Advantages of Histograms

Histograms:

  • Summarise many numerical observations compactly.
  • Reveal broad distributional shape.
  • Show skewness, multiple peaks, gaps, and tails.
  • Support exploratory data analysis.
  • Require relatively little statistical knowledge to read.
  • Can display counts, proportions, percentages, or density.
  • Are supported by nearly all statistical packages.
  • Can reveal data-quality problems before formal modelling.

Limitations of Histograms

Histograms also have important limitations:

  • Individual observations are hidden within bins.
  • Appearance depends on bin width and origin.
  • Small samples may produce unstable shapes.
  • Visual centre and spread are approximate.
  • Outliers may be hidden within broad end bins.
  • Overlapping histograms can be difficult to compare.
  • A graph cannot establish the cause of a pattern.
  • Apparent normality does not demonstrate population normality.
  • Different software defaults may produce different graphs.
  • Unequal-width bins are easily misrepresented.

Common Histogram Mistakes

Using categorical data

A histogram should not be used simply because category labels have been coded as numbers.

Choosing bins to produce a preferred result

Changing bins until the chart supports a desired conclusion is misleading. Inspect several reasonable choices and report the method transparently.

Using raw frequency with unequal widths

This makes wider intervals appear more important than their concentration justifies. Use frequency density.

Omitting units

A reader should know whether the horizontal axis represents years, seconds, kilograms, dollars, or another unit.

Hiding empty intervals

Removing a zero-frequency interval can falsely make separated groups appear continuous.

Ignoring missing values

Most software omits missing observations automatically. Report how many observations were excluded.

Truncating the displayed range

Underflow and overflow bins may hide extreme values. State any limits or exclusions.

Interpreting the tallest bar as the exact mode

The tallest bar identifies a modal interval, not necessarily the exact mode of the raw data.

Claiming normality from appearance alone

A histogram is a diagnostic aid, not a definitive normality test.

Comparing groups with different bins

Groups should use common bin edges when their histograms are compared.

How Histograms Are Used in Modern Research

Exploratory data analysis

Researchers often inspect histograms before calculating inferential statistics. The graph can reveal skewness, restricted ranges, unusual observations, or mixed subgroups.

Checking measurement quality

Histograms may reveal:

  • Values recorded only at round numbers.
  • Ceiling or floor effects.
  • Impossible negative values.
  • Instrument detection limits.
  • Censored measurements.
  • Data-entry spikes.
  • Unit-conversion errors.

Evaluating model residuals

A histogram of residuals can show asymmetry, heavy tails, or unusual values. It should usually be interpreted alongside:

  • A Q–Q plot.
  • Residual-versus-fitted plots.
  • Influence diagnostics.
  • Subject-matter assumptions.

Simulation and resampling

Histograms can display:

  • Monte Carlo results.
  • Bootstrap estimates.
  • Randomisation distributions.
  • Posterior simulation draws.
  • Repeated-sampling distributions.

The horizontal axis should identify the simulated statistic, not merely say “frequency.”

Comparing groups

Researchers may compare distributions through:

  • Separate panels with identical bins and axes.
  • Side-by-side small multiples.
  • Frequency polygons.
  • Density plots.
  • Transparent overlays used cautiously.

Separate panels are often easier to interpret than several opaque overlapping histograms.

Quality control

Histograms are used to examine process output, dimensional measurements, waiting times, and defect-related metrics.

A histogram can describe a process distribution, but process stability over time normally requires time-ordered tools such as control charts.

Machine learning and data science

Histograms are used to inspect:

  • Feature distributions.
  • Class imbalance.
  • Model scores.
  • Prediction errors.
  • Changes between training and production data.
  • Data drift.
  • Quantisation.
  • Image-pixel intensity.

A changed histogram may indicate drift, but a formal comparison and contextual investigation are needed before concluding that the underlying process has changed.

Creating a Histogram in Common Software

Software menus and defaults can change. Always inspect the bin settings and axis labels after generating the graph.

Microsoft Excel

A common workflow is:

  1. Place raw numerical observations in one column.
  2. Select the values.
  3. Choose Insert.
  4. Select Insert Statistic Chart.
  5. Choose Histogram.
  6. Open Format Axis to modify bin width, number of bins, underflow, or overflow settings.
  7. Add an informative title and axis labels.

Excel’s Data Analysis ToolPak can also create a frequency table from user-specified bin limits.

Google Sheets

  1. Enter the raw numerical values.
  2. Select the data.
  3. Choose Insert > Chart.
  4. Select Histogram chart as the chart type.
  5. Use the customization panel to adjust bucket size and axes.
  6. Verify that the selected column contains numerical observations rather than an already grouped frequency table.

IBM SPSS Statistics

  1. Choose Graphs > Chart Builder.
  2. Select Histogram from the gallery.
  3. Drag the simple histogram to the canvas.
  4. Drag a scale variable to the x-axis.
  5. Select count or percentage as appropriate.
  6. Add a normal or density curve only when it serves a clear analytical purpose.
  7. Edit bins and labels in the Chart Editor when necessary.

R

A basic histogram can be created with:

x <- c(12, 14, 15, 15, 16, 18, 18, 19, 21, 22, 23, 24,
       24, 25, 27, 29, 31, 33, 34, 35, 38, 42, 47, 58)

hist(
  x,
  breaks = "FD",
  probability = FALSE,
  main = "Distribution of Completion Times",
  xlab = "Completion time in seconds",
  ylab = "Frequency"
)

For a density-scaled histogram:

hist(
  x,
  breaks = "FD",
  probability = TRUE,
  main = "Density of Completion Times",
  xlab = "Completion time in seconds",
  ylab = "Density"
)

R’s hist() function supports Sturges, Scott, and Freedman–Diaconis bin-selection methods.

Python with NumPy and Matplotlib

from collections.abc import Sequence

import matplotlib.pyplot as plt
import numpy as np


def plot_completion_times(values: Sequence[float]) -> None:
    data = np.asarray(values, dtype=float)

    if data.size == 0:
        raise ValueError("At least one numerical observation is required.")

    if not np.isfinite(data).all():
        raise ValueError("The data contain missing or non-finite values.")

    plt.figure()
    plt.hist(data, bins="fd")
    plt.title("Distribution of Completion Times")
    plt.xlabel("Completion time in seconds")
    plt.ylabel("Frequency")
    plt.tight_layout()
    plt.show()


times = [
    12, 14, 15, 15, 16, 18, 18, 19,
    21, 22, 23, 24, 24, 25, 27, 29,
    31, 33, 34, 35, 38, 42, 47, 58,
]

plot_completion_times(times)

For a density-scaled histogram, pass density=True to plt.hist().

NumPy supports several automatic bin estimators. Researchers should record which method or explicit edges were used.

Histograms and Artificial Intelligence

Generative AI tools can help users:

  • Write R or Python code.
  • Explain software menus.
  • Suggest axis labels.
  • Create accessible captions.
  • Identify possible interpretations.
  • Compare several bin-selection rules.

However, AI-generated output should be checked carefully.

Verification checklist

Confirm that the AI:

  1. Used the correct variable.
  2. Did not silently remove valid observations.
  3. Reported missing-value handling.
  4. Used appropriate interval boundaries.
  5. Distinguished frequency from density.
  6. Applied weights correctly.
  7. Preserved common bins when comparing groups.
  8. Did not infer normality from appearance alone.
  9. Did not invent sample characteristics.
  10. Did not expose confidential research data.

AI can assist with computation and communication, but responsibility for analytical decisions remains with the researcher.

How to Report a Histogram in a Research Paper

A research figure should be understandable without requiring the reader to reconstruct the analysis.

Report or make clear:

  • The variable and units.
  • The analytic sample size.
  • Missing-data exclusions.
  • Bin width, edges, or selection rule when relevant.
  • Whether the y-axis shows count, percentage, or density.
  • Any transformation, truncation, or weighting.
  • Whether groups use identical bins.
  • The software or package when reproducibility matters.

Example results description

Completion times were concentrated between 10 and 30 seconds. The histogram showed a right-skewed distribution, with progressively fewer observations at longer durations and one observation in the 50–60 second interval.

This description distinguishes direct graphical evidence from interpretation. It does not claim that the tail has a specific cause.

Example figure caption

Figure 1. Distribution of task-completion times. The histogram displays 24 valid observations using 10-second equal-width bins. Bar height represents frequency. Intervals are left-closed and right-open, except for the final interval.

Accessibility considerations

  • Do not rely only on colour.
  • Use readable labels and text size.
  • Include units.
  • Provide alternative text describing the main pattern.
  • Avoid unnecessary three-dimensional effects.
  • Ensure sufficient contrast.
  • Explain unusual axis transformations.

Conclusion

A histogram groups numerical observations into consecutive intervals and uses bar area to represent their frequency, relative frequency, or density. It is one of the most useful tools for exploring distribution shape, centre, spread, tails, gaps, and possible outliers.

Its apparent pattern is influenced by bin width, bin origin, sample size, scaling, and data quality. Researchers should therefore examine alternative bins, label the axes precisely, distinguish frequency from density, and support visual conclusions with suitable numerical summaries and complementary diagnostic graphs.

About the author

Muhammad Hassan

Muhammad Hassan writes about research design, academic methods and data-analysis concepts for ResearchMethod.net. His work focuses on presenting methodological topics in clear language for students and early-career researchers. Articles are developed from recognized methodological literature and official software documentation.