Just over three-quarters of Wales's best primary and special schools in 2006-7 had high numbers of pupils entitled to free school meals (FSM).
An analysis of school inspection reports for the year by TES Cymru reveals 10 out of 13 schools awarded seven grade 1s had over 16 per cent FSM entitlement - the national Wales average.
The highest, Mount Stuart Primary School in Cardiff Bay, had a huge 52 per cent. Nine of the schools were also eligible for extra Assembly government cash from the RAISE fund, given directly to needy schools with FSM entitlement of 20.1 per cent or above.
The findings prove beyond doubt at primary level that good schools can be excellent, despite poverty and social deprivation. But the trend is not repeated at the best secondary schools. All of them had FSM entitlement lower than the national and local averages.
The best and worst-performing schools for 2006-7 were named in the annual report launched by Dr Bill Maxwell, chief inspector of education and training in Wales, in Newport last week.
Five schools were in special measures, with 16 causing serious concern - double the number for 2005-6. But the FSM entitlement of the schools varies greatly from 2.5 per cent to 35 per cent, indicating other factors at play apart from social disadvantage.
In the same year, one-third of local authorities inspected were described as poor, and two-thirds were deemed unlikely to improve.
Wales's outgoing director of the Assembly government's department for children, education and lifelong learning, Steve Marshall, said this week that high FSM entitlement and low achievement did not necessarily go together.
Speaking at a conference in Cardiff introducing the school effectiveness framework - an Assembly government strategy aimed at narrowing the gap between the best and worst-performing schools - he said: "There is one local authority which, despite having high FSM, is achieving extremely well.
"Another local authority with low FSM incidence is not performing as well as some others," he said.
David Reynolds, professor of education at Plymouth University, said the disparity in achievement within LAs was down to specific social circumstances within the area and the support provided.
He said one LA, Neath Port Talbot, performed above expectation. But Cardiff and Swansea, with a high concentration of top-performing schools, were not excelling despite their affluence.
There is growing concern over large achievement gaps between local authorities, schools and even classrooms. The variation in good GCSE passes between schools in the same economic band can be as much as 20 per cent.
In his annual report, Dr Bill Maxwell said given the average six-year Estyn inspection cycle, LAs were not identifying troubled schools soon enough.
One in 10 schools were "not doing well enough" and in a worse position than in their last inspection. Only Waunfawr Primary in Caerphilly, was removed from special measures last year.
Analysis shows a common feature of the poorest-performing schools was the lack of a culture of self-evaluation. In many cases, inspectors disagreed with the judgements schools had made.
By contrast, the best-performing schools were praised for their good leadership and effective self-evaluation. Of the 18 schools and one FE college awarded top grades, most showed outstanding progress.
Gareth Jones, secretary of the Association of School and College Leaders Cymru, said: "It depends on what you mean by a good school, but self-evaluation is one of the best indicators of priorities."
Professor Reynolds said: "If you're struggling you may need more than a review."
Lynne Berriman, Year 6 teacher at Mount Stuart Primary in Cardiff, said: "Self-evaluation is an integral part of our development plan. We look at the whole school and then at our own subject areas.
"Our pupils come to the school with low baseline scores but we have high expectations. We emphasise speaking and listening."
AWARDED GRADE 1S FOR SEVEN AREAS
Albany Primary School, Cardiff
All Saints' VA Primary, Wrexham
Crindau Primary School, Newport
Cwmrhydyceirw Primary School, Swansea
Durham Road Infant School, Newport
Lliswerry Infant School, Newport
Mount Stuart Primary School, Cardiff
St Thomas Primary School, Swansea
Trelewis Primary School, Merthyr Tydfil
Ty Isaf Infant School, Caerphilly
Ysgol Deganwy, Conwy
Cardiff High School, Cardiff
St Joseph's RC High School, Newport
Ysgol Dewi Sant, Pembrokeshire
Ysgol Gyfun Bryn Tawe, Swansea
Ysgol Gyfun Y Strade, Carmarthenshire
Trinity Fields School, Caerphilly
Ysgol Cedewain, Powys