Batting average is hits divided by at bats (hits + outs + reached on error).
ERA is earned runs divided by innings pitched, then multiplied by nine (in other words, the average number of earned runs given up over nine innings).
For more info: Baseball-almanac
reaching on error counts as an out so. Remember BB(walks), sac bunts, sac flies and HPB do not count as plate appearences.
Baseball is very much math related. All of the player stats are mathematical. Managers use this math to decide batting orders, pitching rotations, when to substitute, bunt, steal, intentionally walk, etc.
Doctors can use percentages in a great many number of ways. Doctors can use percentages to calculate the probability for having a certain disease.
In 1883, Art Benedict played in 3 games, all for the Philadelphia Quakers, and batting in all of them. He had 15 at bats, getting 4 hits, for a .267 batting average, with 4 runs batted in. He was walked 0 times. He struck out 4 times. He hit 1 double, 0 triples, and 0 home runs.
Hank Aaron and Babe Ruth
In 1873, Eland played in 1 games, batting in all of them. He had 3 at bats, getting 0 hits, for a .000 batting average, with 0 runs batted in. He was walked 0 times. He struck out 0 times.
In 1882, Amos Booth played in 1 games, batting in all of them. He had 3 at bats, getting 0 hits, for a .000 batting average, with runs batted in. He was walked 0 times. He struck out times.
In 1882, Tug Arundel played in 1 games, batting in all of them. He had 5 at bats, getting 0 hits, for a .000 batting average, with runs batted in. He was walked 0 times. He struck out times.
In 1884, Frank Bahret played in 2 games, batting in all of them. He had 8 at bats, getting 0 hits, for a .000 batting average, with runs batted in. He was walked 0 times. He struck out times.
In 1884, Jerry Dorsey played in 1 games, batting in all of them. He had 3 at bats, getting 0 hits, for a .000 batting average, with runs batted in. He was walked 0 times. He struck out times.
In 1882, John Dyler played in 1 games, batting in all of them. He had 4 at bats, getting 0 hits, for a .000 batting average, with runs batted in. He was walked 0 times. He struck out times.
In 1882, Harry East played in 1 games, batting in all of them. He had 4 at bats, getting 0 hits, for a .000 batting average, with runs batted in. He was walked 0 times. He struck out times.
In 1882, Tom Evers played in 1 games, batting in all of them. He had 4 at bats, getting 0 hits, for a .000 batting average, with runs batted in. He was walked 0 times. He struck out times.