Hi all.(adsbygoogle = window.adsbygoogle || []).push({});

I am trying to find out if it's possible to calculate an r^2 value (% of variation explained) when performing a linear bivariate regression using dummy variables.

Let me provide an example of what I'm working on. I'm trying to find if a correlation exists between the type of house people live in and the amount of electricity they use, so my house types are:

Detached, semi-detached, terraced and flats.

I have monitoring data from several hundred houses and have worked out the average for each house type - let's suppose in terms of average kWh per year we have:

Detached - 4000 kWh/yr

Semi-detached - 3600 kWh/yr

Terraced - 3300 kWh/yr

Flats - 3200 kWh/yr

I've done ANOVA on the groups and found that there is a statistically significant differnce between at least two of them. My issue now is: how do I put these into a single equation that gives me some kind of r^2 value so that I can show how much variability is explained by the house type?

Is this even possible? How do I go about this?

Any advice greatly appreciated.

**Physics Forums | Science Articles, Homework Help, Discussion**

Dismiss Notice

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Bivariate regression, dummy variables and r^2

Can you offer guidance or do you also need help?

Draft saved
Draft deleted

**Physics Forums | Science Articles, Homework Help, Discussion**