Is this table in 3NF? I have a table person with attributes:

id
name
city
state
country


id is the primary key. Is this table in 3NF? If 1000 people live in same city it seems redundant to store the same data for state, city, and country.
No it is not.

Consider this data

id | name | city        | state      | country
----------------------------------------------
 1 | john | Los Angeles | California | USA
 2 | mary | San Antonio | Texas      | USA
 3 | joe  | Los Angeles | California | USA


It is clear that (city,state,country) is a candidate key for another table.  Then, you would quickly realise that the cities belong to the same (state,country) combinations.  Eventually, you end up with

Person
------
id
name
city_id

City
--------
city_id
name
state_id

State
--------
state_id
name
country_id

Country
----------
country_id
name