import java.util.Random;

public class FreeThrow {
    public static void main(String[] args) {
        int totalTrials = 50;
        int innerTrials = 50;
        int favorableOutcomes = 0;

        Random random = new Random();

        for (int i = 0; i < totalTrials; i++) {
            int innerFavorableOutcomes = 0;

            for (int j = 0; j < innerTrials; j++) {
                int randomNumber = random.nextInt(10) + 1; // Generates a random number between 1 and 10

                // Check if the outcome is in the range 1 through 8
                if (randomNumber >= 1 && randomNumber <= 8) {
                    innerFavorableOutcomes++;
                }
            }

            double innerSampleProportion = (double) innerFavorableOutcomes / innerTrials;
            System.out.println("Inner Sample Proportion: " + innerSampleProportion);

            // Accumulate the inner sample proportions
            favorableOutcomes += innerFavorableOutcomes;
        }

        // Calculate the overall sample proportion
        double sampleProportion = (double) favorableOutcomes / (totalTrials * innerTrials);
        System.out.println("\nOverall Sample Proportion: " + sampleProportion);
    }
}

FreeThrow.main(null);
Inner Sample Proportion: 0.76
Inner Sample Proportion: 0.78
Inner Sample Proportion: 0.74
Inner Sample Proportion: 0.88
Inner Sample Proportion: 0.92
Inner Sample Proportion: 0.76
Inner Sample Proportion: 0.74
Inner Sample Proportion: 0.78
Inner Sample Proportion: 0.88
Inner Sample Proportion: 0.76
Inner Sample Proportion: 0.78
Inner Sample Proportion: 0.68
Inner Sample Proportion: 0.68
Inner Sample Proportion: 0.82
Inner Sample Proportion: 0.68
Inner Sample Proportion: 0.72
Inner Sample Proportion: 0.76
Inner Sample Proportion: 0.84
Inner Sample Proportion: 0.74
Inner Sample Proportion: 0.84
Inner Sample Proportion: 0.64
Inner Sample Proportion: 0.78
Inner Sample Proportion: 0.76
Inner Sample Proportion: 0.76
Inner Sample Proportion: 0.84
Inner Sample Proportion: 0.9
Inner Sample Proportion: 0.78
Inner Sample Proportion: 0.8
Inner Sample Proportion: 0.76
Inner Sample Proportion: 0.78
Inner Sample Proportion: 0.9
Inner Sample Proportion: 0.76
Inner Sample Proportion: 0.76
Inner Sample Proportion: 0.74
Inner Sample Proportion: 0.92
Inner Sample Proportion: 0.9
Inner Sample Proportion: 0.76
Inner Sample Proportion: 0.84
Inner Sample Proportion: 0.82
Inner Sample Proportion: 0.9
Inner Sample Proportion: 0.68
Inner Sample Proportion: 0.72
Inner Sample Proportion: 0.82
Inner Sample Proportion: 0.74
Inner Sample Proportion: 0.78
Inner Sample Proportion: 0.86
Inner Sample Proportion: 0.88
Inner Sample Proportion: 0.84
Inner Sample Proportion: 0.72
Inner Sample Proportion: 0.78

Overall Sample Proportion: 0.7892