Close
SciStat
 

Bar graph

Description

In this graph, means or medians of variables and subgroups of variables can be represented graphically, either as bars or horizontal lines.

Error bars can illustrate variation or statistical precision.

Required input

Data model

  • 1 continuous and 1 categorical variable: select this option when you have one continuous variable and one variable that defines a subgroup classification, for example:

  • 1 continuous and 2 categorical variables: select this option when you have one continuous variable and two variables that define 2 classifications, for example:

  • n continuous variables without subgroups: select this option when you have several continuous variable, without subgroups, for example:

  • n continuous and 1 categorical variable: select this option when you have several continuous variables and one variable that defines a subgroup classification, for example:

Variables

  • Select the variables of interest.
  • Optionally select a filter to include a subset of cases.

Graph options

  • Plot: you can either represent the means of medians in the graph.
  • Plot as: the means or medians can be represented by bars or by horizontal lines.
  • Error bars:

    If mean is selected: (none), or 95% CI (Confidence Interval) for the mean, 1 SD, 2 SD, 3 SD, 1 SEM, and range.

    • Note that 2 SEM is not in this list: when the number of cases is large, mean ± 2 SEM corresponds to the 95% confidence interval (CI) for the mean. When the number of cases is small, then the 95% CI interval is calculated as mean ± t * SEM, where t is taken from a t-table with DF=n−1 and area A=95%).
    • Although 1 SEM gives the more narower error bar, this option is not recommended since the resulting error bar may be highly misleading, especially when the number of cases in the groups is different. Preferably the 95% CI for the mean is used for providing a valid graphical comparison of means (Pocock, 1984), or use 2 SD as an indication for the variability of the data.
    If median is selected: (none), or 95% CI for the median, 25-75 percentiles, 10-90 percentiles, 5-95 percentiles, 2.5-97.5 percentiles, 1-99 percentiles, and range
    • When the number of cases is small, it is possible that the 95% CI for the median is not defined and that it will not be displayed in the graph.
    • When you use percentile ranges, take into account the number of observations: you need at least 100 observations for 1-99 percentiles, at least 20 for 5-95 percentiles, at least 10 for 10-90 percentile and at least 4 for 25-75th percentiles.

    Options

    • If the data require a logarithmic transformation (e.g. when the data are positively skewed), select the Logarithmic transformation option.
    • Markers: includes all the data points in the graph.

    See also

    Link

    Go to Bar graph.