Question

In: Math

Create variables called sam20means and sam50means that contains the means of the samples. Use a density...

Create variables called sam20means and sam50means that contains the means of the samples. Use a density plot to show the sampling distribution of the means for sam20means and sam50means together.

????Compare the Standard Error (SE) of the sampling distributivos. Which sample size creates better estimates of the population mean (ie. has the lowest SE). Solve using R.????

Solutions

Expert Solution

Create variables called sam20means and sam50means that contains the means of the samples. Use a density plot to show the sampling distribution of the means for sam20means and sam50means together.

Let us create samples from normal distribution with mean 20 and with sd 2.

R code:

sam20<-rnorm(20, 20,2)

sam50<-rnorm(50, 20,2)

d1 <- density(sam20)

d2 <- density(sam50)

par(mfrow=c(1,2))

plot(d1)

plot(d2)

se20<-sd(sam20)/sqrt(20);se20

se50<-sd(sam50)/sqrt(50);se50

R output:

se20<-sd(sam20)/sqrt(20);se20

[1] 0.3716666

> se50<-sd(sam50)/sqrt(50);se50

[1] 0.2653752

??Compare the Standard Error (SE) of the sampling distributivos. Which sample size creates better estimates of the population mean (ie. has the lowest SE). Solve using R.

Standard Error (SE) of the sampling distribution with n=20 is 0.3717

Standard Error (SE) of the sampling distribution with n=50 is 0.2654

The sample with size 50 creates better estimates of the population mean (ie. has the lowest SE).


Related Solutions

Using C# Create a class called Artist that contains 4 pieces of information as instance variables:...
Using C# Create a class called Artist that contains 4 pieces of information as instance variables: name (datatype string), specialization – i.e., music, pottery, literature, paintings (datatype string), number of art items (datatype int), country of birth (datatype string). Create a constructor that initializes the 4 instance variables. The Artist class must contain a property for each instance variable with get and set accessors. The property for number should verify that the Artist contributions is greater than zero. If a...
directions: use c++ Create a  ContactInfo class that contains the following member variables: name age phoneNumber The...
directions: use c++ Create a  ContactInfo class that contains the following member variables: name age phoneNumber The ContactInfo class should have a default constructor that sets name = "", phoneNumber = "", and age = 0. The ContactInfo class should have a constructor that accepts the name and phone number as parameters and sets name = <value of parameter name>, aAge = 0, and phoneNumber = <value of parameter phone number>. The ContactInfo class should have accessor and mutator functions for...
Create a new class called Account with a main method that contains the following: • A...
Create a new class called Account with a main method that contains the following: • A static variable called numAccounts, initialized to 0. • A constructor method that will add 1 to the numAccounts variable each time a new Account object is created. • A static method called getNumAccounts(). It should return numAccounts. Test the functionality in the main method of Account by creating a few Account objects, then print out the number of accounts
Create a UEmployee class that contains member variables for the university employee name and salary. The...
Create a UEmployee class that contains member variables for the university employee name and salary. The UEmployee class should contain member methods for returning the employee name and salary. Create Faculty and Staff classes that inherit the UEmployee class. The Faculty class should include members for storing and returning the department name. The Staff class should include members for storing and returning the job title. Write a runner program that creates one instance of each class and prints all of...
Create a C# Application. Create a class object called “Employee” which includes the following private variables:...
Create a C# Application. Create a class object called “Employee” which includes the following private variables: firstN lastN idNum wage: holds how much the person makes per hour weekHrsWkd: holds how many total hours the person worked each week regHrsAmt: initialize to a fixed amount of 40 using constructor. regPay otPay After going over the regular hours, the employee gets 1.5x the wage for each additional hour worked. Methods: constructor properties CalcPay(): Calculate the regular pay and overtime pay. Create...
Write a class called Pen that contains the following information: Private instance variables for the price...
Write a class called Pen that contains the following information: Private instance variables for the price of the pen (float) and color of the pen (String). A two-argument constructor to set each of the instance variables above. If the price is negative, throw an IllegalArgumentException stating the argument that is not correct. Get and Set methods for each instance variable with the same error detection as the constructor. public class Pen {
If ? ? ? are random variables density function ? (?, ?) = ??^-? (?+?), ?...
If ? ? ? are random variables density function ? (?, ?) = ??^-? (?+?), ? <? < ∞, ? <? <∞, find a) the cumulative joint distribution of ?=?+? b) the joint distribution of ? = ?/? ? ? = ? c) the marginal distribution of U
Assume that population means are to be estrimated from the samples described. Use the sample results...
Assume that population means are to be estrimated from the samples described. Use the sample results to approximate the margin of error and 95% confidence interval. Sample Size= 144. Sample mean = 81. Sample standard deviation=6.
Assume that population means are to be estimated from samples below. Use the sample results to...
Assume that population means are to be estimated from samples below. Use the sample results to approximate the margin of error and 95% confidence interval sample size =100, sample mean=70, sample standard deviation= 12
Create a class called Student. Include the following instance variables: name, address, phone, gpa Create all...
Create a class called Student. Include the following instance variables: name, address, phone, gpa Create all of the methods required for a standard user defined class: constructors, accessors, mutators, toString, equals Create the client for testing the Student class Create another class called CourseSection Include instance variables for: course name, days and times course meets (String), description of course, student a, student b, student c (all of type Student) Create all of the methods required for a standard user defined...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT