When will seated leaders buck the odds against them? While single factors such as high inflation, sprawling corruption scandals, or a united opposition can bring down the incumbent, winning is more complicated. Many factors need to fall in line. No one we have met captured this challenge more succinctly than the Karnataka politician UT Khader, when he told us that to win Indian elections political parties have to pass not one but a simultaneous battery of tests.

Though Khader didn’t spell out his own tests, I knew what he meant, and a short list culled from my years on the road would include tests of community, family, inflation, welfare, development, corruption and money. They are not equally weighted. For all the social progress India has made, community identity is still the key to politics.

Above all, parties have to get the community equation spot on, starting with the selection of candidates with the right character and profile to appeal to the complex mix of sub-castes, religions and languages in each constituency and state.

Rarely does one community or identity define even 30% of the population and often the “dominant” communities include just 10%-20% of the electorate, as for example is the case in UP and Bihar. The elections in these states look like similar contests for the affection of three main voting blocs, Muslims, Yadavs and Dalits. In reality, the Dalits and Yadavs of UP are not the same communities as the Dalits and Yadavs in Bihar. So Mayawati is the champion of the Dalits in UP but not in Bihar, where Ram Vilas Paswan is the champion of a different set of Dalit sub-castes. Lalu Prasad Yadav is the big Yadav leader in Bihar but not in UP, where Mulayam Singh Yadav and his son dominate. Multiply this confusion by thousands of sub-communities, combined and mixed in different proportions in every state.

Often, community ties are so powerful, leaders can build a devoted following even if they lack obvious charisma. Though dazzling oratory and good looks – particularly fair-skinned good looks – can help, even a mumbling delivery and toad-like stature don’t kill political careers, if a candidate has community appeal. Indian voters have flocked to oratorical masters like Modi and Vajpayee, but also to figures with at best middling talent at the microphone, including Mayawati, Mulayam and Jayalalithaa. What they lack in oratorical style, these supremos typically make up for in grassroots connection to a community – think of Mayawati, riding her bicycle around Bijnor for months to connect with fellow Dalits and build her name as their caste champion.

Understanding the dynamics of caste and religion down to the local and personal level is a necessary condition for winning, but it is often not sufficient. Politics flows downhill from culture, and in India culture is deeply engrained in both community and family. My mind goes back to all the politicians we met who had family in the game or were actively passing power on to their sons, daughters or wives: Mulayam, Lalu, Thackeray, Karunanidhi, Deve Gowda. The list goes on and on. The Gandhis are the most prominent example but family dynasties pervade our politics.

Though it is bitterly critical of the Gandhi dynasty, the BJP has many leaders with children active in politics, from Rajnath Singh to Yeddyurappa.

Many voters accept and even embrace hereditary succession in a society where families house many generations under one roof, and traditional bloodlines shape even the most successful private businesses. Outside the state-owned firms, two-thirds of the top hundred Indian private listed companies are owned by families. Among the top 100 Indian names on the 2018 Forbes billionaire list, 68 come from a few small mercantile castes, which together account for only 1% of the national population. By far the most prominent among them are the Banias, who have dominated the billionaire ranks since Indians started to appear on the Forbes list.

Though easily criticised as nepotism, since that’s what it is, the family feel of Indian politics would be sorely missed if it were gone. More than anything, what draws me back to the road in India is its incredible warmth, the knowledge that anywhere I go I will be treated as someone close to kin, that voters of any caste will be willing to stop and talk, that politicians and officials of any party will be ready to roll out a banquet for our travelling group.

The warmth India extends to strangers is an extension of the way it sees family, and never ceases to bowl us over. Before entering the backcountry of states like UP and Bihar we have often been warned to expect carjackers, bandits, kidnappers or Naxalites, only to find a warm and placid welcome. In all our wanderings we have rarely had any reason to feel scared. That’s a sharp contrast to other large developing nations, from Brazil to South Africa, where even the main streets of big cities are a minefield of very real risks.

In the United States, no one just pops into the home of a political VIP without long advance warning and often carefully negotiated conditions. Children are generally off limits. Public and private lives are separate. In India, we have found ourselves dropping in virtually unannounced – 20 of us – to meet political giants not only in their homes but in their bedrooms, gathering around as they sit cross-legged on the bed.

Often, politicians bring their children along to meetings and rallies, just to listen in, enjoy the show, and maybe absorb a feel for the game. The pomp and fawning that surround these figures in public are matched by the extreme informality that surrounds them in private settings. Why not? We are all like family.

Still, signs of an anti-nepotism revolt have been emerging, at least in the political sphere. More and more single politicians are rising to power on the argument that freedom from family ties protects them from the temptation to profit from office.

In a country where single chief ministers did not exist a generation ago there were eight by early 2018.

The cultural winds suggest single candidates will maintain this advantage going forward, leveraging the claim that a monkish isolation keeps them from passing wealth and power down to ambitious offspring.

One of the most important lessons I have learned on the road is that ideas – particularly economic ideas – do not play the same role in India that they do elsewhere. In more advanced democracies the main ideological divide involves the role of the state versus the free market in distributing wealth. In India everyone is a statist. The economic debate is about how the state can best help the poor, by developing roads and other infrastructure, by distributing welfare benefits, or a bit of everything.

We have seen both development and welfare work – and fail – as campaign strategies. When Naidu won a second straight term in 1999, he cast himself as the pioneer of a new era in which delivering successfully on development and economic reform could help Indian leaders get re-elected. He was tossed out five years later. Gehlot lost in 2003 campaigning as a development hero, and lost again in 2013 as a prodigiously generous champion of welfarism. More than a decade later, Jayalalithaa won re-election in Tamil Nadu, one of the states most hostile to incumbents, after doing little for development and much to promote free food processors, cement and other giveaways branded with her nickname, Amma.

The point is that there is no consistent formula: candidates can pursue any mix of development and welfare models and, as one Tamil voter put it to us, the election will remain as unpredictable as a “cat on the wall, you don’t know which way it will jump”.

Of all the numbers I have run on what determines the outcome of Indian elections, one of the most surprising to me is how little political lift chief ministers get from palpable economic success. Even when their state has been growing faster than 8% – a rate that normally puts an economy in the “miracle” class – their chances of re-election improve only slightly, from one in three to 50:50. Often, voters in mofussil India do not feel a dramatic lift even from a rate of growth that makes the Mumbai’s stock market bubble and the capital elite assume that everyone feels the fizzy good times. Growth helps at the margin, but even spectacular growth is no guarantee of victory – particularly when the rural majority is not feeling the boom.

The number more likely to decide the fate of incumbents is inflation, particularly food price inflation. Unlike double-digit GDP growth, the impact of double-digit inflation rarely goes unfelt or unremarked by voters. Often they can recite recent price increases for onions or ghee down to the rupee, because these numbers determine what – or whether – their family eats. High inflation has presaged the fall of leaders from Rajasthan Chief Minister Shekhawat in 1998 to Prime Minister Manmohan Singh in 2014. But deflation can have the same effect. Lately, farmers have told us they planned to vote against their incumbent government out of frustration over depressed crop prices.

Local issues often trump national ones, and vary dramatically from state to state.

While a prohibition state like Gujarat demands that visitors reveal “the name of the drunkard” seeking to buy alcohol, Tamil Nadu struggles to wean its alcoholics off booze and its state bureaucracy off alcohol tax revenue. Today the clouds of smog stretching across the subcontinent are a big issue in Delhi, a non-issue in provincial cities and towns, where voters are less focused on air quality than more pressing concerns such as finding a functioning school for their children. Even the national corruption scandals that periodically consume Delhi matter less outside the biggest cities than scandals involving state leaders.

Alongside inflation, corruption is the other big incumbent killer, though it works in strange ways. Leaders rarely make it five years without facing some charge of corruption, and many of them can survive so long as the charge doesn’t come to dominate the election storyline. But sweeping corruption charges have been contributing to the defeat of leaders at least since Rajiv and the Bofors case, and we have seen scandal help topple Vasundhara Raje on her ties to a flamboyant “super chief minister”, Mayawati on the self-indulgence of her own statues and palaces, and many others.

One of the supreme ironies of Indian politics, however, is that corruption charges seem to hurt more than convictions. Voters are so sure justice in India is loaded against innocents, they often look more sympathetically on leaders emerging from jail. Lalu Yadav is one of the more irrepressible characters we have encountered in Indian politics, but never more so than after he emerged from prison, and told us he had never felt so adored by his supporters. In other emerging countries politicians may come back after a jail term, but rarely does time in the lock-up provide a career boost, the way it does in India.

The thread that runs through the tests of Indian democracy is intimacy and connection: winning campaigns need to understand the ties that bind Indian voters to community and family, their frustration with government and the slow pace of economic progress, the pain of rising prices, and their sense of disgust with both corruption and the justice system. More than 1.3 billion people, more than 900 million of them eligible to vote in 2019, and yet these intimate connections are the key. Often, challengers prevail by simply watching the incumbent fail one or more of these tests.

Excerpted with permission from Democracy On The Road: A 25-year Journey Through India, Ruchir Sharma, Penguin Random House India.