From Wikipedia:
To determine which players are eligible to win the batting title, the following conditions have been used over the sport’s history:
Pre-1920 – A player generally had to appear in 100 or more games when the schedule was 154 games, and 90 games when the schedule was 140 games. An exception was made for Ty Cobb in 1914, who appeared in 98 games but had a big lead and was also a favorite of League President Ban Johnson.
1920–1949 – A player had to appear in 100 games to qualify in the National League; the AL used 100 games from 1920–1935, and 400 at-bats from 1936–1949. The NL was advised to adopt 400 at-bats for the 1945 season, but League President Ford Frick refused, feeling that 100 games should stand for the benefit of catchers and injured players. (Taffy Wright is often erroneously said to have been cheated out of the 1938 batting title; he batted .350 in exactly 100 games, with 263 ABs. Jimmie Foxx hit .349, in 149 games and 565 AB. But since the AL requirement that year was 400 at-bats, Foxx's batting title is undisputed.)
1950–1956 – A player needed 2.6 at bats per team game originally scheduled. (With the 154-game schedule of the time, that meant a rounded-off 400 at-bats.) From 1951–1954, if the player with the highest average in a league failed to meet the minimum at-bat requirement, the remaining at-bats until qualification (e.g., 5, if the player finished the season with 395 ABs) were hypothetically considered hitless at-bats; if his recalculated batting average still topped the league, he was awarded the title. This standard applied in the AL from 1936–1956.
1957 to the present – A player has needed 3.1 plate appearances per team game originally scheduled; thus, players were no longer penalized for walking so frequently, nor did they benefit from walking so rarely. (In 1954, for example, Ted Williams batted .345 but had only 386 ABs, while topping the AL with 136 walks. Williams thus lost the batting title to Cleveland’s Bobby Avila, who hit .341 in 555 ABs.) In the 154-game schedule, the required number of plate appearances was 477, and since the era of the 162-game schedule, the requisite number of PAs has been 502. (Adjustments to this 502 PA figure have been made during strike-shortened seasons, such as 1972, 1981, 1994, and 1995.)
From 1967 to the present, if the player with the highest average in a league fails to meet the minimum plate-appearance requirement, the remaining at-bats until qualification (e.g., 5 ABs, if the player finished the season with 497 plate appearances) are hypothetically considered hitless at-bats; if his recalculated batting average still tops the league, he is awarded the title. (This policy was invoked in 1981, securing Bill Madlock his third NL batting crown, and in 1996, when NL titlist Tony Gwynn finished the year with only 498 PAs.)
Source:
https://en.wikipedia.org/wiki/Batting_average_(baseball)