My opinion
First of all I have to say that yamaha psr 413 is a bit more expensive that casio ctk 5000 but they are in the same category of arranger keyboards.
Casio has always offered keyboards of less quality that yamaha in sounds, but for the same price generaly offers you keyboards with more functions and options that yamaha. For example: The keyboard yamaha psr 413 is better in sounds that casio ctk 5000, but casio ctk 5000 has many options and functions in that yamaha psr 413 doesn't: for example the possibility of using sd card for recording sequences or data, better keys, you can make your own styles, you have more sounds and more styles.
The same was for the previuos versions of these two keyboards: the yamaha psr 403 and the casio ctk 900. The yamaha had better sounds but the casio had more functions and options.