# Help with regression analysis and 95% confidence interval

#### jamesmdriscoll

##### New Member
Hello!

We have a couple of tasks for an assignment where we need to use regression analysis and 95% confidence interval, we're not sure on how to do it so figured I'd ask you guys for help.

We don't really need the result of the actual task, but rather an detailed explanation to how to do it. So if you have a formula to do the tasks, a detailed step by step to work with that formula would be much appreciated.

1. Use regression analysis to estimate the price of a car that's 2 years newer than the newest car you've got in your data.

2. Use regression analysis to estimate the price of a car that's 5 years older than your oldest car in your data.

3. Use regression analysis to estimate the price of a car that's new. (Guessing year 2013)

4. Calculate a 95% confidence interval on the difference in price between the 15 oldest cars and the 15 newest cars in your data.

If you guys know how to do any of these, any help is much appreciated.

#### Dason

##### Ambassador to the humans
Well the first three are just using the estimated regression equation to get a prediction. So you just plug the year of interest in as 'x' and the result is the prediction. If you didn't have that down then the confidence interval part might be exceedingly difficult. Do you have notes or a book you can go over?

#### jamesmdriscoll

##### New Member
Thanks for such a quick reply. Unfortunately I don't have a book or such. I'm basically wondering if there's a formula to do these things, and if there is if you could post an example using the formula and going through it step by step (to understand what goes where and how to actually do it with real numbers). Hope this makes sense.

#### Dason

##### Ambassador to the humans
What do you have given to you? Do you have the regression equation and/or some other information? Or are you just given the data?

#### jamesmdriscoll

##### New Member
The task made us collect data of 30 cars on a site similar to ebay. So I've got 30 different prices for example. And the year of making, amount driven etc. But what I need to work with is the price. I don't have an equation.

#### Dason

##### Ambassador to the humans
I find it hard to believe that you don't have any material (notes or a book) that gives how to get the regression equation.

You can get the equations to get the estimates for the prediction line here: http://en.wikipedia.org/wiki/Simple_linear_regression but are you sure you don't have any relevant notes? Seems odd that you would have an assignment that would ask you to do this if you haven't learned how to do that stuff already...

And are you using any stats software or are you supposed to do this 'by hand'?

#### jamesmdriscoll

##### New Member
The thing is the other courses has taken up too much time, and now we're left with loads of pre-recorded lectures and a deadline closing in very fast. I was basically hoping there'd be a formula/equation or two which you could walk me through with an example. I have tried to learn this but I find it rather difficult, which is why I'm now here. We have been using Minitab for some tasks, but in these it didn't say we were to use it, or it said to do it by hand.

Most formulas seem messy and are hard to understand (wiki for example). That's why I'd really appreciate if someone could present an example with some made up numbers just to show how it's actually done.

#### Dason

##### Ambassador to the humans
There is an example on wikipedia. I'm sorry but it sounds like you just fell behind in your coursework and want somebody to condense the required lectures down for you. I don't really feel like doing that - maybe somebody else will. But like I said there is an example of how to get the regression coefficients 'by hand' in that wikipedia article I linked to. Minitab can easily do regression as well but I don't use the software - I'm sure in one of those pre recorded lectures it goes through how to do this.