/*! This file is auto-generated */ .wp-block-button__link{color:#fff;background-color:#32373c;border-radius:9999px;box-shadow:none;text-decoration:none;padding:calc(.667em + 2px) calc(1.333em + 2px);font-size:1.125em}.wp-block-file__button{background:#32373c;color:#fff;text-decoration:none} Q.10.32 In this exercise, you are to per... [FREE SOLUTION] | 91Ó°ÊÓ

91Ó°ÊÓ

In this exercise, you are to perform a computer simulation to illustrate the sampling distribution of the difference between two sample means for independent samples, Key Fact 10.1 on page 404 .
(a) Simulate1000samples of size 12from a normally distributed variable with a mean of 640 and a standard deviation of 70. Obtain the sample mean of each of the1000samples.
(b) Simulate 1000samples of size 15 from a normally distributed variable with a mean of 715 and a standard deviation of 150 . Obtain the sample mean of each of the 1000 samples.
(c) Obtain the difference, x1−x2, for each of the 1000 pairs of sample means obtained in parts (a) and (b).
(d) Obtain the mean, the standard deviation, and a histogram of the 1000differences found in part (c).

Short Answer

Expert verified

(a)

(b)

(c)

(d)

Step by step solution

01

Part (a) Step 1:Given information

Create a random 1000sample with a standard deviation of70and a sample mean of 640.

02

Explanation

Given that, The sample size (n), mean (role="math" localid="1653901375641" x), and standard deviation (σ) are all given.x¯=640,σ=70,n=1000,σ=70,n=1000
Calculation:
In MATLAB, generate 1000male samples using the function "norminv" with 640sample mean and 70standard deviation. In MATLAB, generate 1000 male samples using the function "norminv" with 640sample mean and 70 standard deviation.
x=norminv(rand(1000,12),640,70)
Following that, we will receive 1000random samples.
Program:
clc
clear
close all
n=1000;r=norminv(rand(n,12),640,70);x=mean(r,2);
Query:
  • First, we established the number of samples.
  • Then, using the function "norminv," generate 1000random samples with a sample mean of 640and a standard deviation of 70.
03

Part (b) Step 1: Given information

Define a random 1000-sample sample with a standard deviation of 150 and a sample mean of 715.

04

Explanation

Given that, the sample size (n), mean (role="math" localid="1653901451323" x), and standard deviation (σ) are all given.
x=715,σ=150,n=1000
Calculation:
In MATLAB, generate 1000male samples with a sample mean of 715and a standard deviation of 150using the function "norminv."
x1=norminv(rand(1000,12),715,150)
Following that, we will obtain 1000 random samples.
Program:
clc
clear
close all
n=1000;r=norminv(rand(n,12),715,150);
Query:
  • First, we established the number of samples.
  • Then, using the function "norminv," generate 1000random samples with a sample mean of 715and a standard deviation of 150.
05

Part (c) Step 1: Given information

Determine the difference between the samples from parts (a) and (b).

06

Explanation

Given that, The sample size (n), mean (x), and standard deviation (σ) are all given.
x=640,σ=70,n=1000,x=715,σ=150,n=1000,
Calculation:
In MATLAB, generate 1000 male samples using the function "norminv" with 640sample mean and 75standard deviation.
x=norminv(rand(1000,12),640,70)
Then, in MATLAB, generate 1000male samples with a sample mean of 715and a standard deviation of 150using the function "norminv."
x1=norminv(rand(1000,12),715,150)
After that, subtract both samples.
a=x−x1
07

Program

clc
clear
close all
n=1000;r=norminv(rand(n,12),640,70);x=mean(r,2);
r1=norminv(rand(n,12),715,150);x1=mean(r1,2);
a=x-x1;
Query:
  • First, we established the number of samples.
  • Then, using the function "norminv," generate 1000random samples with a sample mean of 640and a standard deviation of 75.
  • The sample is then generated with a mean of 715and a standard deviation of 150.

    Subtraction of both samples

08

Part (d) Step 1: Given information

Create a histogram of all samples from the part (c).

09

Explanation

Given that,The sample size (n), mean (x), and standard deviation (σ) are all given.
x=640,σ=70,n=1000x=715,σ=150,n=1000
Calculation:
In MATLAB, generate 1000 male samples using the function "norminv" with 640sample mean and 75standard deviation.
x=norminv(rand(1000,12),640,70)
Then, in MATLAB, generate male sample means of 715and standard deviations of 150.
x1=norminv(rand(1000,12),715,150)
After that, subtract both samples.
a=x−x1
The histogram is then generated using MATLAB.
10

Program

Clc
clear
close all
n=1000;r=norminv(rand(n,12),640,70);x=mean(r,2);r1=norminv(rand(n,12),715,150);x1=mean(r1,2);a=x−x1;
Query:
  • First, we established the number of samples.
  • The random samples are then generated.
  • The histogram is then generated.

Unlock Step-by-Step Solutions & Ace Your Exams!

  • Full Textbook Solutions

    Get detailed explanations and key concepts

  • Unlimited Al creation

    Al flashcards, explanations, exams and more...

  • Ads-free access

    To over 500 millions flashcards

  • Money-back guarantee

    We refund you if you fail your exam.

Over 30 million students worldwide already upgrade their learning with 91Ó°ÊÓ!

One App. One Place for Learning.

All the tools & learning materials you need for study success - in one app.

Get started for free

Study anywhere. Anytime. Across all devices.