I work in NJ but live in NY. The state wages on my W2 for NJ are less than my federal gross income and NY wages. Do I need to file for both NY and NJ?

Why are the wages different?