You are on page 1of 5

STATGRAPHICS – Rev.

6/18/2009

Barchart

The Barchart procedure plots a column of counts or frequencies using either vertical or
horizontal bars. If desired, error bars may be added to display the sampling error in the
frequencies.

Sample StatFolio: barchart.sgp

Sample Data:
The file election.sgd contains a typical set of data for this procedure.

Candidate Respondents
Bush 1455
Kerry 1356
Undecided 207

The above data shows the results of a poll of n = 3,018 likely voters prior to the 2004 U.S.
presidential election. The data will be represented by

fj = frequency corresponding to row j, (1)

where j = 1, 2, … k.

 2009 by StatPoint Technologies, Inc. Barchart - 1


STATGRAPHICS – Rev. 6/18/2009

Data Input
The data input dialog box specifies the column containing the data to be plotted.

 Counts: numeric column with the data to be plotted.

 Labels: optional column with labels for each bar.

 Standard errors: optional column with numeric values used to plot error bars for each
count.

 Select: subset selection.

Analysis Summary
The Analysis Summary shows the number of data values and their sum.

Barchart - Respondents
Data variable: Respondents

Sum of 3 values: 3018.0

 2009 by StatPoint Technologies, Inc. Barchart - 2


STATGRAPHICS – Rev. 6/18/2009

Barchart
The Barchart plots each data value as a vertical or horizontal bar.

Barchart for Percentage

Bush

Kerry

Undecided

0 10 20 30 40 50
frequency

Pane Options

 Chart Type: The bars may be clustered side by side as shown in the example or stacked one
upon the other.

 Scaling: whether the axis scale shows the frequencies fj or the percentages given by

fj
p j  100 % (2)
n
 2009 by StatPoint Technologies, Inc. Barchart - 3
STATGRAPHICS – Rev. 6/18/2009

where

k
n  fj (3)
j 1

 Direction: whether the bars extend horizontally or vertically.

 Error bars: if standard errors are to be plotted, whether their magnitude is indicated by an I-
beam or a simple line.

 Baseline: the value from which the bars extend.

Example: Vertical Barchart with Non-zero Baseline


The following chart plots vertical bars extending from a baseline of 20.

Barchart for Respondents


50

40
percentage

30

20

10

0
Bush Kerry Undecided

Example: Chart with Error Bars


If the n respondents have been randomly selected from some population, then the frequencies
may be assumed to follow a multinomial distribution. The standard errors of the frequencies,
which measure their sampling variability, are given by

s.e.( f j )  n j (1   j ) (4)

where j equals the proportion of all respondents in the population who would have responded
according to category j. These standard errors may be estimated by

s.eˆ.( f j )  f j (n  f j ) / n (5)

To add standard error bars to the plot, modify the data input dialog box as shown below:

 2009 by StatPoint Technologies, Inc. Barchart - 4


STATGRAPHICS – Rev. 6/18/2009

A plot of the frequencies with I-beam error bars then takes the following form:

Barchart for Respondents

Bush

Kerry

Undecided

0 10 20 30 40 50
percentage

 2009 by StatPoint Technologies, Inc. Barchart - 5

You might also like