Congratulations on being accepted to both, and being able to make the choice. Assuming you have no strong connections to / feelings about either, I would definitely say NCSU. When you apply for a job, nobody really cares about the ranking of the program or the university, as long as the school has an acceptable reputation. Employers want to know if you can do the job they are hiring you to do.
Ask yourself how many years you want to be saddled with student debt. It has become a crisis for many college graduates. You can go to the very fine NCSU program and pay for the entire program with less $ than the cost of one year at Duke. Let that soak in. Are you interested in buying a home in the future? In having expendable income for vacations, etc.? Going into debt for purposes of prestige of a program makes literally no sense. Just my two cents, so no haters, please.