You can apply the same concept to simulate the chance every groupsmember of random group of 5 people has an iq greater than or equal to 110.

Pseudocode

The simulate_chance_2(n) pseudocode1 (not real R code) below returns the simulated chance that a group of 5 people are ALL having an iq greater than or equal to 110 based on n generated groups:

simulate_chance_2 <- function(n) {
    counter <- 0
    # TODO: correct the for-loop definition so that it runs n times
    for n times {
        # TODO: generate 5 normally distributed iq values with the rnorm() function (mean = 100, standard deviation = 15)

        # TODO: correct the if condition
        if ALL of these 5 iq values are greater than or equal to 110 {
            # TODO: add one to the counter variable
        }
    }
    # TODO: calculate (and return) the frequency that 5 normally distributed iq values are ALL greater than or equal to 110
}

Exercise