Question 1: Using the SATGPA data set in Stat2Data package. Test by using a.0. 1
ID: 2909611 • Letter: Q
Question
Question 1: Using the SATGPA data set in Stat2Data package. Test by using a.0. 1) Create the following three variables and then print out all the six variables a. Create a new variable "SAT", which is the sum of MathSAT and VerbalSAT b. Create second new variable "SATLevel", and assign the value of "SATLevel" as 1 when SAT 1100, 2 when 1100-SAT 1200, 3 when 1200-SAT-1300, and 4 when SAT 1300. c. Create third new variable "GPALevel" and assign the value of "GPALevel" as 1 when GPA -2.8,2 when 2.8cGPA 3.3, 3 when 3.33.5 d. 2) Use the Chi-Square test to conclude if the SATLevel and GPALevel are independent. 3) Compute the mean and variance of "GPA" for cach level of "GPALevel", and compute the correlation matrices for the four variables: MathSAT, VerbalSAT, GPA and SAT. 4) Do the data provide sufficient evidence to indicate that the mean of MathSAT is significantly greater than the mean of VerbalSAT 5) Test if the proportion of MathSAT less than VerbalSAT is 0.5.Explanation / Answer
public class Demo {
public static void main(String[] args) {
Pizza p1 = new Pizza();
p1.setPrice(100.5);
p1.setTitle("Small");
p1.setTypeNumber(1);
p1.display();
Pizza p2 = new Pizza(2, 155.5, "Medium");
p2.display();
}
}
Pizza.java
public class Pizza {
private int typeNumber;
private double price;
private String title;
public Pizza() {
}
public Pizza(int typeNumber, double price, String title) {
super();
this.typeNumber = typeNumber;
this.price = price;
this.title = title;
}
public void display() {
System.out.println( "Pizza [price=" + price + ", title=" + title + ", typeNumber="
+ typeNumber + "]");
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public int getTypeNumber() {
return typeNumber;
}
public void setTypeNumber(int typeNumber) {
this.typeNumber = typeNumber;
}
public double getPrice() {
return price;
}
public void setPrice(double price) {
this.price = price;
}
}
Output:
Pizza [price=100.1, title=Small, typeNumber=1]
Pizza [price=155.1, title=Medium, typeNumber=2]
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.