Split ratio function to handle shuffled sequences