Skill testing question
Skill testing questions (or STQ) are a legal requirement attached to many contests in Canada.

Origin
The combined effect of Sections 197 to 206 of the Canadian Criminal Code bans for-profit gaming or betting, with exceptions made for provincial lotteries, licensed casinos, and charity events. Many stores, radio stations, and other groups still wish to hold contests to encourage more purchases or increase consumer interest. These organizations take advantage of the fact that the law does allow prizes to be given for games of skill, or mixed games of skill and chance. To make the chance-based contests legal, such games generally consist of a mathematical skill-testing question (STQ). Penalties for violating the contest section of the Criminal Code, if it was enforced, include up to two years of imprisonment if charged as an indictable offense or a fine no more than $25,000 on a summary conviction charge. 

The Promotional Contest Provision of the Competition Act also states that "selection of participants or distribution of prizes is not made on the basis of skill or on a random basis."

Courts have accepted that estimating number of beans in a jar as a game with skill and number of votes will be cast in an upcoming election as a game with mixed skill and chance. Thus neither example requires additional STQ as the skill component has been met.

Question format
The most common form that these questions take is as an arithmetic exercise. A court decision ruled that a mathematical STQ must contain at least three operations to actually be a test of skill.  For example, a sample question is "(16 × 5) - (12 ÷ 4)" (Answer: 77). The winner should not receive any assistance (e.g. using a calculator, asking another individual to calculate the answer for the winner) in answering the STQ. Enforcement of these rules is not very stringent, especially for small prizes. Enforcement is often impossible if the winner chooses the time and location to answer the question (for example, the question is attached to the prize claim form). In most cases, there is no individual monitoring to ensure the integrity of answering STQ without assistance and the winner will submit the claim form having affirmed that they completed STQ without any assistance. In some cases, the player may not be required to answer the STQ to claim a prize. The questions are also becoming easier. For contests held in other countries but open to Canadians, a STQ must be asked of any potential Canadian winner.

Consequences for not answering correctly
Since those sections of the Criminal Code require elements of skill for the winners to be awarded of their prize, not answering the STQ correctly can result in the prize not being awarded. This has happened in at least one occasion for Tim Hortons' Roll Up the Rim contest winner in 2008. The individual failed to answer the same STQ correctly on the prize claim form twice due to a learning disability. Tim Hortons refused to release the prize until the intervention of a local newspaper.

Free entry alternative
The Criminal Code also prohibits receiving consideration in exchange for playing the games, resulting in the free entry alternative which is usually indicated by "No purchase necessary" in the fine print of a contest. Generally this means that it is possible to enter the contest for free by, for example, writing a letter to the entity sponsoring the contest and requesting a game piece or entry form.

References

Law of Canada
Gambling regulation
Year of establishment missing