Imagine a list of ordered by descending elements:
List<T> list = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1];
How can I implement Random, so that the first elements have a higher chance to be chosen than the other elements? So say like, 20% to get index 1, 17,5% to get index 2, 15% to get index 3, etc. However, the chances shouldn't be that severe, because it needs to add up to 100%. It is also important to note that the list can be of any length, so the chances cannot be hardcoded.
In summary: How can I implement random, so that the index can be chosen of a list of n elements, where the first couple n elements have a higher chance to be chosen than the last couple elements, so by descending order?