If you're struggling to maintain a healthy weight you might want to have a word with your partner.
The new study was led by Professor Chris Haley of the Medical Research Council's Human Genetics Unit at the University of Edinburgh.
For the study, published in the journal PLoS Genetics, researchers analysed data provided by 20,000 people from families in Scotland which was originally gathered as part of a national resource of health data.
They compared a person's family genetics and home environment as a child to their lifestyle as an adult and scored these against a set of risks associated with obesity.
They looked at trends relating to obesity including waist to hip ratio, blood pressure, body fat content and body mass index and found that the lifestyle couples lead together has a stronger influence than upbringing.
According to The Telegraph, Professor Haley said: "Although genetics accounts for a significant proportion of the variation between people, our study has shown that the environment you share with your partner in adulthood also influences whether you become obese and this is more important than your upbringing.
"The findings also show that even people who come from families with a history of obesity can reduce their risk by changing their lifestyle habits."
The NHS say the best way to treat obesity is to eat a healthy, reduced-calorie diet and to exercise regularly. To do this they recommend you:
:: Eat a balanced, calorie-controlled diet as recommended by your GP or dietitian
:: Join a local weight loss group
:: Take up activities such as fast walking, jogging, swimming or tennis for 150-300 minutes per week
:: Eat slowly and avoid situations where you know you could be tempted to overeat.
For more information visit NHS Choices.