British car insurance advertisements are going to change. Right now they are populated by annoying Welsh opera singers, stick cartoon figures, and meerkats. But all of these are likely soon to be made redundant, replaced perhaps by white kittens with pink bows, giggling babies and sophisticated-looking models with designer handbags. So I predict.

Why? Because of the latest daft 'equality' regulation from the European Union. From December 21, insurers will be banned from offering cheaper insurance premiums to women, following a ruling by the European Court of Justice (ECJ). According to motoring groups, it means that women will face a 25% increase in their premiums, despite the fact that they are statistically much safer drivers. On average, women take shorter journeys, obey the speed limits more faithfully and brake less hard. But they could be facing premium bills of £400 on an average family car.

The most accident-prone drivers, of course, are young men. They are less experienced, enjoy speeding and barking, and drive more at night – often in the company of inebriated friends who egg them on to take risks. Which is why young men aged 17-22 pay average premiums of £1,604 compared to the £1,127 paid by females of the same age, according to the Automobile Association. A survey by the comparison website uSwitch.com reports that just over one in eight (13%) female drivers think they will not be able to afford to keep motoring. Apart from the inconvenience, that may also reduce the employment prospects of women who depend on their own transport to get to work safely.

The ECJ ruling is motivated by noble intentions – to remove discrimination between the sexes. But it is economically illiterate. And the trouble with economically illiterate legal or political decisions is that they produce widespread unintended and indeed unwelcome consequences.

The illiteracy here is the belief – and how often we hear it – that insurance is about 'pooling risk'. That instead of bearing the whole risk of certain events individually – ill health, car accidents, household disasters – we each chip in a little and compensate those who suffer when the risk becomes reality.

In fact, insurance is nothing of the sort. It is about putting a price on a risk. The insurer calculates your risk, and charges you a premium that reflects the likelihood of the misfortune actually happening to you, the amount that they would have to pay out to compensate, and a little bit of profit for the service they give you – which is peace of mind. And as information technology advances, such risks can be calculated more and more precisely. Houses in certain postcodes, for example, are more likely to be burgled than those in others. But more than that: whether you live in the middle of a street or on the corner, in a house or an apartment block, on the ground floor or the first floor, behind a door with secure locks or not – all these are relevant factors, and insurers price them accordingly. The same is true of motor insurance. If you are young, male, or you drive a flash red car, you are more likely to cost the insurers money than if you are older, female, in a modest runabout. You pay more to reflect those risks.

It may sound unfair, but in fact this price system does a useful job, encouraging people to minimise the risks they expose themselves to. For example, one reason why young men have high accident rates is because they drive at night with those tipsy pals of theirs. But insurers are now trialling in-car technology that reports motorists' driving habits back to them. And a young person who agrees not to drive late at night can, as a result, get cheaper premiums, reflecting the lower risks.

Of course, people cannot change their sex – or at least, it is not easy and hardly worth doing solely to get cheaper insurance. So the insurance price difference between men and women is not something that can be moderated by an easy behavioural change. Hence the notion that women are being discriminated against. Someone in an area with high burglary risk can install locks and alarms. Men are pretty well stuck with being men, with all their faults.

But trying to make equality legislation take the strain is mixing up markets and civics, and trying to make markets do things they are quite unqualified to do. Once governments start manipulating prices, perverse incentives and disruptive effects ripple out through the entire economy, and nobody knows that ultimate damage they will wreak. It is better to let the price system do its job, then deal with any unwelcome results through the welfare system. We do not ensure that everyone has access to food by putting price caps on supermarket prices. We know that if we did, pretty soon the shelves would be empty. Instead, we give cash to needy people. Likewise, if we want to keep down the insurance premiums of men so they equalise those of women, we should subsidise men through the tax system, not force the insurance providers to do it. Either way we will get perverse incentives and will see more, dangerous, male drivers on the road, so either way it is a daft policy. But when you mess with the price system, that is what happens.

Insurers, of course, certainly do not want customers who they cannot charge the proper price for, and who are more likely to cause them to pay out. More than ever, they will be pursuing female customers, rather than male. The enterprising ones will be advertising insurance in ways and through media that are so girly that no self-respecting red-blooded male would go near them. If you like kittens and babies, you are in for a treat.