Hi! I need help replicating this example in R
THE CENTRAL LIMIT THEOREM 7.4 The Central Limit Theorem states that, under rather general conditions, sums and means of random samples of measurements drawn from a population tend to have an approximately normal distribution. Suppose you toss a balanced die n = 1 time. The random variable x is the number observed on the upper face. This familiar random variable can take six values, each with probability 1/6, and its probability distribution is shown in Figure 7.3. The shape of the distribution is flat or uniform and symmet- ric about the mean & = 3.5, with a standard deviation o = 1.71. (See Section 4.8 and Exercise 4.84.) FIGURE 7.3 Probability distribution for x, the number appearing on a single toss of a die 1/6- Now, take a sample of size n = 2 from this population; that is, toss two dice and record the sum of the numbers on the two upper faces, Ex, = x1 + x2. Table 7.5 shows the 36 possible outcomes, each with probability 1/36. The sums are tabulated, and each of the possible sums is divided by n = 2 to obtain an average. The result is the sampling distribution of x = Ex, shown in Figure 7.4. You should notice the dra- matic difference in the shape of the sampling distribution. It is now roughly mound- shaped but still symmetric about the mean / = 3.5.FIGURE 7.4 Sampling distribution of X for n = 2 dice .15- pur-lurk x-bar Average of Two Dice Using MINITAB, we generated the sampling distributions of x when n = 3 and n = 4. For n = 3, the sampling distribution in Figure 7.5 clearly shows the mound shape of the normal probability distribution, still centered at A = 3.5. Notice also that the spread of the distribution is slowly decreasing as the sample size n increases. Figure 7.6 dramatically shows that the distribution of x is approximately normally distributed based on a sample as small as n = 4. This phenomenon is the result of an important statistical theorem called the Central Limit Theorem (CLT). FIGURE 7.6 MINITAB sampling distri- bution of X for n = 3 dice r-lari Average of Three Dice