Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

**Java Language only** Directions:the code below tells me the first second and t

ID: 3742217 • Letter: #

Question

**Java Language only**

Directions:the code below tells me the first second and third numbers which are most relevant in the array as well as the how many times they popped up in the code, using the data below Add to the code making it tell me what the numbers chance percentage of it being in the rang of (1-5)(6-10)(11-15)(16-20)(21-25)(26-30)(31-35)(36-40)(41-45)(46-50) (51-55)(56-60)(61-65)(66-70) Only 1 throught 70. Example below..

I will Thumbs up good work thanks!!

/**

Example :

Array: {12,10, 4, 28, 56, 3, 70,63,22,48}

Output: chances 1-5= 20%

chances 6-10=10%

chances 11-15=10%

chances 16-20=0%

chances 21-25=10%

chances 26-30=10%

chances . 31-35=0%

  chances 36-40=0%

chances 41-45=0%

  chances 46-50=10%

chances 51-55=0%

chances 56-60=10%

chances 61-65=10%

chances 66-70=10%

*/

//Cheggs.java

import java.util.Comparator;

import java.util.HashMap;

import java.util.Map;

import java.util.TreeMap;

public class Cheggs {

public static TreeMap<Integer, Integer> getFrequencyMap(int num[]) {

HashMap<Integer, Integer> counts = new HashMap<Integer, Integer>();

for (int i = 0; i < num.length; i++) {

if (counts.containsKey(num[i])) {

int c = counts.get(num[i]) + 1;

counts.put(num[i], c);

}

else {

counts.put(num[i], 1);

}

}

ValueComparator<Integer, Integer> bvc = new ValueComparator<Integer, Integer>(

counts);

TreeMap<Integer, Integer> sortedMap = new TreeMap<Integer, Integer>(bvc);

sortedMap.putAll(counts);

return sortedMap;

}

public static void main(String args[]) {

int num1[] = { 3, 6, 14, 1, 31, 1, 2, 9, 32, 1, 1, 1, 50, 21, 1, 2, 13,

2, 17, 2, 11, +1, 1, 14, 22, 5, 2, 11, 16, 3, 21, 14, 8, 4, 2,

7, 3, 1, 12, 8, 7, 16, 4, 11, 7, 4, 14, 5, 6, 7, 1, +24, 10, 7,

17, 14, 5, 28, 14, 1, 29, 10, 2, 3, 2, 8, 13, 28, 4, 4, 10, 1,

28, 2, 8, 6, 14, 76, 10, 56, 3, +3, 5, 6, 1, 10, 6, 17, 20, 6,

51, 2, 7, 21, 12, 25, 1, 5, 8, 15, 26, 4, 11, 4, 2 };

int num2[] = { 20, 6, 16, 31, 26, 03, 2, 9, 65, 1, 1, 1, 40, 21, 1, 2,

13, 2, 17, 2, 11, +1, 1, 14, 22, 5, 2, 11, 16, 9, 21, 14, 8, 4,

2, 2, 3, 1, 12, 8, 5, 16, 4, 11, 7, 4, 14, 1, 6, 7, 1, +24, 10,

7, 17, 14, 5, 28, 14, 1, 29, 10, 2, 3, 3, 17, 16, 28, 1, 4, 10,

1, 28, 4, 8, 6, 14, 16, 10, 16, 3, +3, 1, 6, 1, 10, 6, 17, 20,

6, 31, 2, 7, 21, 12, 25, 1, 5, 9, 18, 26, 4, 11, 4, 2, };

int num3[] = { 60, 60, 15, 5, 5, 5, 5, 60, 8, 8,40,50,60,10,20,30,40,50,60+
4,6,50,45,32,67,26,42,35,67,69,34,37,38,5,67,45,23,12,47};

int num4[] = { 24, 4, 90, 4, 25, 25, 4, 25, 4,40,10,45,67,56,34,34,58,30,34,54+
7,4,2,6,8,30,35,70,50,30,29,10,43,65,43,23,43,25,75,23,67,43,21,64,23,};

int num5[] = { 53, 57, 59, 60, 60, 60, 60, 12, 12,6,4,2,6,16,27,23,25,28,50,30+
45,70,20,34,56,78,12,34,56,70,23,45,67,50,64,35,64,};

int num6[] = { 20, 20, 5, 3, 8, 8, 8, 8, 5, 5,8,9,6,34,23,25,26,12,16,70,45,67+
8,6,45,65,34,23,47,43,45,47,48,49,50,30,24,12,54,62,45,56};

TreeMap<Integer, Integer> sortedMap1 = getFrequencyMap(num1);

TreeMap<Integer, Integer> sortedMap2 = getFrequencyMap(num2);

TreeMap<Integer, Integer> sortedMap3 = getFrequencyMap(num3);

TreeMap<Integer, Integer> sortedMap4 = getFrequencyMap(num4);

TreeMap<Integer, Integer> sortedMap5 = getFrequencyMap(num5);

TreeMap<Integer, Integer> sortedMap6 = getFrequencyMap(num6);

for (int i = 0; i < 3; i++) {

if (i == 0) {

System.out.print("First Relevance Number: output:");

/**

* storing all the keys (relevant numbers) in integer variables

*/

int v1 = (Integer) sortedMap1.keySet().toArray()[i];

int v2 = (Integer) sortedMap2.keySet().toArray()[i];

int v3 = (Integer) sortedMap3.keySet().toArray()[i];

int v4 = (Integer) sortedMap4.keySet().toArray()[i];

int v5 = (Integer) sortedMap5.keySet().toArray()[i];

int v6 = (Integer) sortedMap6.keySet().toArray()[i];

// displaying them

System.out.print(v1 + "," + v2 + "," + v3 + "," + v4 + "," + v5

+ "," + v6);

System.out.println();

System.out.print(" Most relevant numbers came up ");

/**

* displaying relevant numbers and their number of occurrences

*/

System.out.print("(" + v1 + " came up " + sortedMap1.get(v1)

+ " times) ");

System.out.print("(" + v2 + " came up " + sortedMap2.get(v2)

+ " times) ");

System.out.print("(" + v3 + " came up " + sortedMap3.get(v3)

+ " times) ");

System.out.print("(" + v4 + " came up " + sortedMap4.get(v4)

+ " times) ");

System.out.print("(" + v5 + " came up " + sortedMap5.get(v5)

+ " times) ");

System.out.print("(" + v6 + " came up " + sortedMap6.get(v6)

+ " times) ");

System.out.println();

}

if (i == 1) {

System.out.print(" Second Relevance Number: output:");

int v1 = (Integer) sortedMap1.keySet().toArray()[i];

int v2 = (Integer) sortedMap2.keySet().toArray()[i];

int v3 = (Integer) sortedMap3.keySet().toArray()[i];

int v4 = (Integer) sortedMap4.keySet().toArray()[i];

int v5 = (Integer) sortedMap5.keySet().toArray()[i];

int v6 = (Integer) sortedMap6.keySet().toArray()[i];

System.out.print(v1 + "," + v2 + "," + v3 + "," + v4 + "," + v5

+ "," + v6);

System.out.println();

System.out.print(" Second most relevant numbers came up ");

System.out.print("(" + v1 + " came up " + sortedMap1.get(v1)

+ " times) ");

System.out.print("(" + v2 + " came up " + sortedMap2.get(v2)

+ " times) ");

System.out.print("(" + v3 + " came up " + sortedMap3.get(v3)

+ " times) ");

System.out.print("(" + v4 + " came up " + sortedMap4.get(v4)

+ " times) ");

System.out.print("(" + v5 + " came up " + sortedMap5.get(v5)

+ " times) ");

System.out.print("(" + v6 + " came up " + sortedMap6.get(v6)

+ " times) ");

System.out.println();

}

if (i == 2) {

System.out.print(" Third Relevance Number: output:");

int v1 = (Integer) sortedMap1.keySet().toArray()[i];

int v2 = (Integer) sortedMap2.keySet().toArray()[i];

int v3 = (Integer) sortedMap3.keySet().toArray()[i];

int v4 = (Integer) sortedMap4.keySet().toArray()[i];

int v5 = (Integer) sortedMap5.keySet().toArray()[i];

int v6 = (Integer) sortedMap6.keySet().toArray()[i];

System.out.print(v1 + "," + v2 + "," + v3 + "," + v4 + "," + v5

+ "," + v6);

System.out.println();

System.out.print(" Third most relevant numbers came up ");

System.out.print("(" + v1 + " came up " + sortedMap1.get(v1)

+ " times) ");

System.out.print("(" + v2 + " came up " + sortedMap2.get(v2)

+ " times) ");

System.out.print("(" + v3 + " came up " + sortedMap3.get(v3)

+ " times) ");

System.out.print("(" + v4 + " came up " + sortedMap4.get(v4)

+ " times) ");

System.out.print("(" + v5 + " came up " + sortedMap5.get(v5)

+ " times) ");

System.out.print("(" + v6 + " came up " + sortedMap6.get(v6)

+ " times) ");

System.out.println();

}

}

}

}

class ValueComparator<T1, T2 extends Comparable<T2>> implements Comparator<T1> {

Map<T1, T2> base;

public ValueComparator(Map<T1, T2> base) {

this.base = base;

}

@Override

public int compare(T1 k1, T1 k2) {

T2 val1 = base.get(k1);

T2 val2 = base.get(k2);

return val2.compareTo(val1);

}

}

Explanation / Answer

Hello, I have answered the previous version of this question. So I’m making proper changes to the old one to satisfy the new requirements. Comments are included, go through it, learn how things work and let me know if you have any doubts. Thanks

// Cheggs.java

import java.util.Comparator;

import java.util.HashMap;

import java.util.Map;

import java.util.TreeMap;

public class Cheggs {

      public static TreeMap<Integer, Integer> getFrequencyMap(int num[]) {

            HashMap<Integer, Integer> counts = new HashMap<Integer, Integer>();

            for (int i = 0; i < num.length; i++) {

                  if (counts.containsKey(num[i])) {

                        int c = counts.get(num[i]) + 1;

                        counts.put(num[i], c);

                  }

                  else {

                        counts.put(num[i], 1);

                  }

            }

            ValueComparator<Integer, Integer> bvc = new ValueComparator<Integer, Integer>(

            counts);

            TreeMap<Integer, Integer> sortedMap = new TreeMap<Integer, Integer>(bvc);

            sortedMap.putAll(counts);

            return sortedMap;

      }

      public static void main(String args[]) {

            int num1[] = { 3, 6, 14, 1, 31, 1, 2, 9, 32, 1, 1, 1, 50, 21, 1, 2, 13,

                        2, 17, 2, 11, +1, 1, 14, 22, 5, 2, 11, 16, 3, 21, 14, 8, 4, 2,

                        7, 3, 1, 12, 8, 7, 16, 4, 11, 7, 4, 14, 5, 6, 7, 1, +24, 10, 7,

                        17, 14, 5, 28, 14, 1, 29, 10, 2, 3, 2, 8, 13, 28, 4, 4, 10, 1,

                        28, 2, 8, 6, 14, 76, 10, 56, 3, +3, 5, 6, 1, 10, 6, 17, 20, 6,

                        51, 2, 7, 21, 12, 25, 1, 5, 8, 15, 26, 4, 11, 4, 2 };

            int num2[] = { 20, 6, 16, 31, 26, 03, 2, 9, 65, 1, 1, 1, 40, 21, 1, 2,

            13, 2, 17, 2, 11, +1, 1, 14, 22, 5, 2, 11, 16, 9, 21, 14, 8, 4,

            2, 2, 3, 1, 12, 8, 5, 16, 4, 11, 7, 4, 14, 1, 6, 7, 1, +24, 10,

            7, 17, 14, 5, 28, 14, 1, 29, 10, 2, 3, 3, 17, 16, 28, 1, 4, 10,

            1, 28, 4, 8, 6, 14, 16, 10, 16, 3, +3, 1, 6, 1, 10, 6, 17, 20,

            6, 31, 2, 7, 21, 12, 25, 1, 5, 9, 18, 26, 4, 11, 4, 2, };

            int num3[] = { 60, 60, 15, 5, 5, 5, 5, 60, 8, 8, 40, 50, 60, 10, 20,

                        30, 40, 50, 60 + 4, 6, 50, 45, 32, 67, 26, 42, 35, 67, 69, 34,

                        37, 38, 5, 67, 45, 23, 12, 47 };

            int num4[] = { 24, 4, 90, 4, 25, 25, 4, 25, 4, 40, 10, 45, 67, 56, 34,

                        34, 58, 30, 34, 54 + 7, 4, 2, 6, 8, 30, 35, 70, 50, 30, 29, 10,

                        43, 65, 43, 23, 43, 25, 75, 23, 67, 43, 21, 64, 23, };

            int num5[] = { 53, 57, 59, 60, 60, 60, 60, 12, 12, 6, 4, 2, 6, 16, 27,

                        23, 25, 28, 50, 30 + 45, 70, 20, 34, 56, 78, 12, 34, 56, 70,

                        23, 45, 67, 50, 64, 35, 64, };

            int num6[] = { 20, 20, 5, 3, 8, 8, 8, 8, 5, 5, 8, 9, 6, 34, 23, 25, 26,

                        12, 16, 70, 45, 67 + 8, 6, 45, 65, 34, 23, 47, 43, 45, 47, 48,

                        49, 50, 30, 24, 12, 54, 62, 45, 56 };

            TreeMap<Integer, Integer> sortedMap1 = getFrequencyMap(num1);

            TreeMap<Integer, Integer> sortedMap2 = getFrequencyMap(num2);

            TreeMap<Integer, Integer> sortedMap3 = getFrequencyMap(num3);

            TreeMap<Integer, Integer> sortedMap4 = getFrequencyMap(num4);

            TreeMap<Integer, Integer> sortedMap5 = getFrequencyMap(num5);

            TreeMap<Integer, Integer> sortedMap6 = getFrequencyMap(num6);

            for (int i = 0; i < 3; i++) {

                  if (i == 0) {

                        System.out.print("First Relevance Number: output:");

                        // storing all the keys (relevant numbers) in integer variables

                        int v1 = (Integer) sortedMap1.keySet().toArray()[i];

                        int v2 = (Integer) sortedMap2.keySet().toArray()[i];

                        int v3 = (Integer) sortedMap3.keySet().toArray()[i];

                        int v4 = (Integer) sortedMap4.keySet().toArray()[i];

                        int v5 = (Integer) sortedMap5.keySet().toArray()[i];

                        int v6 = (Integer) sortedMap6.keySet().toArray()[i];

                        // displaying them

                        System.out.print(v1 + "," + v2 + "," + v3 + "," + v4 + "," + v5

                        + "," + v6);

                        System.out.println();

                        System.out.print(" Most relevant numbers came up ");

                        // displaying relevant numbers and their number of occurrences

                        System.out.print("(" + v1 + " came up " + sortedMap1.get(v1)

                        + " times) ");

                        System.out.print("(" + v2 + " came up " + sortedMap2.get(v2)

                        + " times) ");

                        System.out.print("(" + v3 + " came up " + sortedMap3.get(v3)

                        + " times) ");

                        System.out.print("(" + v4 + " came up " + sortedMap4.get(v4)

                        + " times) ");

                        System.out.print("(" + v5 + " came up " + sortedMap5.get(v5)

                        + " times) ");

                        System.out.print("(" + v6 + " came up " + sortedMap6.get(v6)

                        + " times) ");

                        System.out.println();

                  }

                  if (i == 1) {

                        System.out.print(" Second Relevance Number: output:");

                        int v1 = (Integer) sortedMap1.keySet().toArray()[i];

                        int v2 = (Integer) sortedMap2.keySet().toArray()[i];

                        int v3 = (Integer) sortedMap3.keySet().toArray()[i];

                        int v4 = (Integer) sortedMap4.keySet().toArray()[i];

                        int v5 = (Integer) sortedMap5.keySet().toArray()[i];

                        int v6 = (Integer) sortedMap6.keySet().toArray()[i];

                        System.out.print(v1 + "," + v2 + "," + v3 + "," + v4 + "," + v5

                        + "," + v6);

                        System.out.println();

                        System.out.print(" Second most relevant numbers came up ");

                        System.out.print("(" + v1 + " came up " + sortedMap1.get(v1)

                        + " times) ");

                        System.out.print("(" + v2 + " came up " + sortedMap2.get(v2)

                        + " times) ");

                        System.out.print("(" + v3 + " came up " + sortedMap3.get(v3)

                        + " times) ");

                        System.out.print("(" + v4 + " came up " + sortedMap4.get(v4)

                        + " times) ");

                        System.out.print("(" + v5 + " came up " + sortedMap5.get(v5)

                        + " times) ");

                        System.out.print("(" + v6 + " came up " + sortedMap6.get(v6)

                        + " times) ");

                        System.out.println();

                  }

                  if (i == 2) {

                        System.out.print(" Third Relevance Number: output:");

                        int v1 = (Integer) sortedMap1.keySet().toArray()[i];

                        int v2 = (Integer) sortedMap2.keySet().toArray()[i];

                        int v3 = (Integer) sortedMap3.keySet().toArray()[i];

                        int v4 = (Integer) sortedMap4.keySet().toArray()[i];

                        int v5 = (Integer) sortedMap5.keySet().toArray()[i];

                        int v6 = (Integer) sortedMap6.keySet().toArray()[i];

                        System.out.print(v1 + "," + v2 + "," + v3 + "," + v4 + "," + v5

                        + "," + v6);

                        System.out.println();

                        System.out.print(" Third most relevant numbers came up ");

                        System.out.print("(" + v1 + " came up " + sortedMap1.get(v1)

                        + " times) ");

                        System.out.print("(" + v2 + " came up " + sortedMap2.get(v2)

                        + " times) ");

                        System.out.print("(" + v3 + " came up " + sortedMap3.get(v3)

                        + " times) ");

                        System.out.print("(" + v4 + " came up " + sortedMap4.get(v4)

                        + " times) ");

                        System.out.print("(" + v5 + " came up " + sortedMap5.get(v5)

                        + " times) ");

                        System.out.print("(" + v6 + " came up " + sortedMap6.get(v6)

                        + " times) ");

                        System.out.println();

                  }

            }

            /**

            * finding the chances of numbers between ranges

            * 1-5)(6-10)(11-15)(16-20)(21-25)(26-30)(31-35)(36-40)(41-45)(46-50)

            * (51-55)(56-60)(61-65)(66-70) in the first array

            */

            System.out.println("For array1:");

            int chances = 1; // starting value of first range

            // loops until the range crosses 70

            while ((chances + 4) <= 70) {

                  // count count of occurrences of values between chance and chance+4

                  int count = 0;

                  // inner loop to find the above count

                  for (int j = chances; j < chances + 5; j++) {

                        // checking if the first map contains j

                        if (sortedMap1.containsKey(j)) {

                              // adding to the count

                              count += sortedMap1.get(j);

                        }

                  }

                  // finding the percentage

                  double percentage = (double) count * 100.0 / num1.length;

                  // printing the percentage with a precision of two decimal points

                  System.out.printf("Chances %d-%d = %.2f%% ", chances, chances + 4,

                              percentage);

                  chances += 5;

            }

            /**

            * performing the same technique for all other arrays

            */

            System.out.println("For array2:");

            chances = 1;

            while ((chances + 4) <= 70) {

                  int count = 0;

                  for (int j = chances; j < chances + 5; j++) {

                        if (sortedMap2.containsKey(j)) {

                              count += sortedMap2.get(j);

                        }

                  }

                  double percentage = (double) count * 100.0 / num2.length;

                  System.out.printf("Chances %d-%d = %.2f%% ", chances, chances + 4,

                              percentage);

                  chances += 5;

            }

            System.out.println("For array3:");

            chances = 1;

            while ((chances + 4) <= 70) {

                  int count = 0;

                  for (int j = chances; j < chances + 5; j++) {

                        if (sortedMap3.containsKey(j)) {

                              count += sortedMap3.get(j);

                        }

                  }

                  double percentage = (double) count * 100.0 / num3.length;

                  System.out.printf("Chances %d-%d = %.2f%% ", chances, chances + 4,

                              percentage);

                  chances += 5;

            }

            System.out.println("For array4:");

            chances = 1;

            while ((chances + 4) <= 70) {

                  int count = 0;

                  for (int j = chances; j < chances + 5; j++) {

                        if (sortedMap4.containsKey(j)) {

                              count += sortedMap4.get(j);

                        }

                  }

                  double percentage = (double) count * 100.0 / num4.length;

                  System.out.printf("Chances %d-%d = %.2f%% ", chances, chances + 4,

                              percentage);

                  chances += 5;

            }

            System.out.println("For array5:");

            chances = 1;

            while ((chances + 4) <= 70) {

                  int count = 0;

                  for (int j = chances; j < chances + 5; j++) {

                        if (sortedMap5.containsKey(j)) {

                              count += sortedMap5.get(j);

                        }

                  }

                  double percentage = (double) count * 100.0 / num5.length;

                  System.out.printf("Chances %d-%d = %.2f%% ", chances, chances + 4,

                              percentage);

                  chances += 5;

            }

            System.out.println("For array6:");

            chances = 1;

            while ((chances + 4) <= 70) {

                  int count = 0;

                  for (int j = chances; j < chances + 5; j++) {

                        if (sortedMap6.containsKey(j)) {

                              count += sortedMap6.get(j);

                        }

                  }

                  double percentage = (double) count * 100.0 / num6.length;

                  System.out.printf("Chances %d-%d = %.2f%% ", chances, chances + 4,

                              percentage);

                  chances += 5;

            }

      }

}

class ValueComparator<T1, T2 extends Comparable<T2>> implements Comparator<T1> {

      Map<T1, T2> base;

      public ValueComparator(Map<T1, T2> base) {

            this.base = base;

      }

      @Override

      public int compare(T1 k1, T1 k2) {

            if (base.containsKey(k1) && base.containsKey(k2)) {

                  T2 val1 = base.get(k1);

                  T2 val2 = base.get(k2);

                  return val2.compareTo(val1);

            }

            return -1;

      }

}

/*OUTPUT*/

First Relevance Number: output:1,1,5,4,60,8

Most relevant numbers came up (1 came up 14 times) (1 came up 15 times) (5 came up 5 times) (4 came up 5 times) (60 came up 4 times) (8 came up 5 times)

Second Relevance Number: output:2,2,60,25,12,45

Second most relevant numbers came up (2 came up 11 times) (2 came up 10 times) (60 came up 4 times) (25 came up 4 times) (12 came up 3 times) (45 came up 4 times)

Third Relevance Number: output:4,4,67,23,34,5

Third most relevant numbers came up (4 came up 7 times) (4 came up 7 times) (67 came up 3 times) (23 came up 3 times) (34 came up 2 times) (5 came up 3 times)

For array1:

Chances 1-5 = 40.95%

Chances 6-10 = 21.90%

Chances 11-15 = 15.24%

Chances 16-20 = 5.71%

Chances 21-25 = 5.71%

Chances 26-30 = 4.76%

Chances 31-35 = 1.90%

Chances 36-40 = 0.00%

Chances 41-45 = 0.00%

Chances 46-50 = 0.95%

Chances 51-55 = 0.95%

Chances 56-60 = 0.95%

Chances 61-65 = 0.00%

Chances 66-70 = 0.00%

For array2:

Chances 1-5 = 40.00%

Chances 6-10 = 20.00%

Chances 11-15 = 12.38%

Chances 16-20 = 12.38%

Chances 21-25 = 5.71%

Chances 26-30 = 5.71%

Chances 31-35 = 1.90%

Chances 36-40 = 0.95%

Chances 41-45 = 0.00%

Chances 46-50 = 0.00%

Chances 51-55 = 0.00%

Chances 56-60 = 0.00%

Chances 61-65 = 0.95%

Chances 66-70 = 0.00%

For array3:

Chances 1-5 = 13.16%

Chances 6-10 = 10.53%

Chances 11-15 = 5.26%

Chances 16-20 = 2.63%

Chances 21-25 = 2.63%

Chances 26-30 = 5.26%

Chances 31-35 = 7.89%

Chances 36-40 = 10.53%

Chances 41-45 = 7.89%

Chances 46-50 = 10.53%

Chances 51-55 = 0.00%

Chances 56-60 = 10.53%

Chances 61-65 = 2.63%

Chances 66-70 = 10.53%

For array4:

Chances 1-5 = 13.64%

Chances 6-10 = 9.09%

Chances 11-15 = 0.00%

Chances 16-20 = 0.00%

Chances 21-25 = 20.45%

Chances 26-30 = 9.09%

Chances 31-35 = 9.09%

Chances 36-40 = 2.27%

Chances 41-45 = 11.36%

Chances 46-50 = 2.27%

Chances 51-55 = 0.00%

Chances 56-60 = 4.55%

Chances 61-65 = 6.82%

Chances 66-70 = 6.82%

For array5:

Chances 1-5 = 5.56%

Chances 6-10 = 5.56%

Chances 11-15 = 8.33%

Chances 16-20 = 5.56%

Chances 21-25 = 8.33%

Chances 26-30 = 5.56%

Chances 31-35 = 8.33%

Chances 36-40 = 0.00%

Chances 41-45 = 2.78%

Chances 46-50 = 5.56%

Chances 51-55 = 2.78%

Chances 56-60 = 22.22%

Chances 61-65 = 5.56%

Chances 66-70 = 8.33%

For array6:

Chances 1-5 = 9.76%

Chances 6-10 = 19.51%

Chances 11-15 = 4.88%

Chances 16-20 = 7.32%

Chances 21-25 = 9.76%

Chances 26-30 = 4.88%

Chances 31-35 = 4.88%

Chances 36-40 = 0.00%

Chances 41-45 = 12.20%

Chances 46-50 = 12.20%

Chances 51-55 = 2.44%

Chances 56-60 = 2.44%

Chances 61-65 = 4.88%

Chances 66-70 = 2.44%