# how to get Line chart with mean and StDev

#### gianmarco

##### TS Contributor
Hi All,

I am wondering to know what program (and what command) I can use to get a line chart displaying at the same time the observations I have and the mean and StDev for the data.

I have a series of house floor measurements (in square meters) and I would like to visually display the observations as points connected by a line, and an horizontal line should indicate the mean value, while a top and bottom line should display respectively one standard deviation above and below the mean.

Any help is appreciated.

Thanks
Regards
Gm

#### terzi

##### TS Contributor
Hi,

Most software will allow you to graph it. In STATA you could use a line plot using options for reference lines. In MINITAB or STATISTICA you can graph the line plot and then add horizontal lines easily. It can also be done in R. In fact, you could calculate both the mean and the standard deviation and add those values to an Excel graph.

#### gianmarco

##### TS Contributor
Hi,

sorry, but I did not manage to sort the problem out.

Can you please show me a small fictional example with the steps needed (I have both Statistica and Minitab).

Thank you for the help,
Regards
Gm

#### terzi

##### TS Contributor
Hi,

There are two ways of doing it. One option is using a x-bar control chart, and modify it to plot only one standard deviation from the mean. It can be done in MINITAB, but I'm not really sure how. The graph is obtained in the Stats>>Control Charts

Now, I'll try to explain the process I know: it may not be the best one but I hope it helps.Well, let's assume you have your data in MINITAB, stored in a single column.

1.First you calculate bothe mean and standard deviation. Go to Stats>>Display Descriptive Stats and choose the column of your data.

2.Once you have the values for both mean and standard deviations, let's do the graph. You can graph it in the Graph>>Time Series Graph Menu. Choose a single graph and add the column where your data is stored.

3.After the graph appears, right click on it and choose from the contextual menu the option add. A submenu will appear where you will see the option reference lines.

4.Now in the section titled "Show reference line as Y values" just type the number you got from the mean.

5.Repeat both 3 and 4 to add more lines for "mean+1 sd" and "mean-sd"

Hi Terzi,