Question

In: Math

Can you please tell me what more information I need to provide to solve below problem?...

Can you please tell me what more information I need to provide to solve below problem?

1. Find out below using R

Hints: Use iris dataset from R (built in data set in R)

a) Create a new data frame called virginica.versicolor (that only contains these two species)

the command I used:

virginica.versicolor <- iris[iris$Species %in% c("versicolor", "virginica"), ]

b) What is your null hypothesis regarding sepal lengths for the two species (virginica.versicolor) ? And what is your alternate hypothesis?

c) Describe your hypotheses in terms of your test statistic: what would be the t under the null hypothesis, H0, and what would be the statement about t under your alternate hypothesis Ha?

d) Would you do a one- or non-(i.e., two-sided) directional test? Why?

e) Conduct a Student’s t-test using the formula format as follows:

t.test(sepal.length ~ species, data = virginica.versicolor, var.equal = T).

f) Explain what the three different sections do within the t.test() function.

g) Did your function run a one- or non-directional test?

h) What is your t-value? Based on the results of your t-test, what is your conclusion and why?

Solutions

Expert Solution

a) Create data frame virginica.versicolor

Code :

data(iris)
virginica.versicolor <- iris[iris$Species %in% c("versicolor", "virginica"), ]


b) The null and alternate hypotheses regarding sepal lengths for the two species is
Ho : sl1 = sl2
Ha : sl1 <> sl2
where sl1, sl2 are the sepal lengths of virginica and versicolor species respectively

c) We will reject the null hypothesis Ho if the test statistic |t| > t-critical
It means that the alternate hypotesis is accepted if the test statistic |t| > t-critical

d) Since we will be testing if there is a difference in the sepal lengths of the two species
    and not testing if one species sepal length is greater/smaller than the other species sepal length,
    we will be using a non-directional, two-sided test

e) Conduct the Student's T-test

Code :

t.test(Sepal.Length ~ Species, data = virginica.versicolor, var.equal = T)

Code Output

    Two Sample t-test

data:  Sepal.Length by Species
t = -5.6292, df = 98, p-value = 1.725e-07
alternative hypothesis: true difference in means is not equal to 0
95 percent confidence interval:
 -0.8818516 -0.4221484
sample estimates:
mean in group versicolor  mean in group virginica 
                   5.936                    6.588 

f) The three sections indicate as below :

Sepal.Length ~ Species   : The numeric data on which the t-test is to be performed, viz. the sepal length grouped by

                                            the species

data = virginica.versicolor    :   data frame containing the variables

var.equal = T    : logical variable indicating the two population variances should be treated as equal.

                          If TRUE then the pooled variance is used to estimate the variance

g) Since we did not specify the "alternative" variable in the function t.test it ran a non-directional test which is the default test.

h) Based on the output, we get

t = -5.6292, df = 98, p-value = 1.725e-07

Also p-value is very small (1.725e-07)

At 5% level of significance we can see that p-value < 0.05

Hence, we reject the null hypothesis.

Conclusion :

There exists significant statistical evidence to conclude that there is a difference between the sepal lengths of the two species virginica and versicolor.


Related Solutions

I need to fix this code, and could you please tell me what was the problem...
I need to fix this code, and could you please tell me what was the problem options 1 and 9 don't work #include <stdio.h> #include <time.h> #include <stdlib.h> // generate a random integer between lower and upper values int GenerateRandomInt(int lower, int upper){     int num =(rand()% (upper - lower+1))+lower;     return num; } // use random numbers to set the values of the matrix void InitializeMatrix(int row, int column, int dimension, int mat[][dimension]){     for(int i =0; i<row; i++){...
please show me or tell me a trick, on how can i tell right away when...
please show me or tell me a trick, on how can i tell right away when a characteristics equation(system) is 1)overdamped 2)underdamped 3)critically damped 4) nonlinear show each an example write neatly!!!!!
Can anyone please tell me what function in excel I could use in this instance: I...
Can anyone please tell me what function in excel I could use in this instance: I have two spreadsheets with sales of products for a company. I am needing to create a new spreadsheet with gross sales by month and by region. It haven't included all the worksheets, because I truly just need pointed in the right direction.
Can you please tell me just the right answer for each question. Do not need explanation....
Can you please tell me just the right answer for each question. Do not need explanation. Thank you! QUESTION 1 The ____ strategies assume that people are rational and follow their own self-interest. ? Empirical-rational? Normative re-educative Power-coercive? Normative-educative 10 points    QUESTION 2 In the ____ change outcomes image, some, but not all, change intentions are achievable. Intended? Partially intended? Unintended? Partially unintended 10 points    QUESTION 3 The ____ image is based on an image of management as...
What I need is for you diagnose, Tell me why you chose that diagnosis. Signs, Symptoms,...
What I need is for you diagnose, Tell me why you chose that diagnosis. Signs, Symptoms, Age, lifestyle, any other factors to lead you to your conclusion. Give some diagnostic tests to confirm your Dx. Then a treatment plan. Patient presents no symptoms occurring at visit. Patient states he has started training for a marathon but has to stop due to tightness in chest and coughing. Patient does not know if there is any wheezing as he runs with an...
What I need is for you diagnose, Tell me why you chose that diagnosis. Signs, Symptoms,...
What I need is for you diagnose, Tell me why you chose that diagnosis. Signs, Symptoms, Age, lifestyle, any other factors to lead you to your conclusion. Give some diagnostic tests to confirm your Dx. Then a treatment plan. Patient presents with a sore on his right big toe. Patient states sore has been there for 10 days and is not getting better if anything he thinks it is looking worse and fears infection. Patient also states his leg has...
What I need is for you diagnose, Tell me why you chose that diagnosis. Signs, Symptoms,...
What I need is for you diagnose, Tell me why you chose that diagnosis. Signs, Symptoms, Age, lifestyle, any other factors to lead you to your conclusion. Give some diagnostic tests to confirm your Dx. Then a treatment plan. Case 1 Bella is a 31 year old nervous young lady who came to see me because she and her husband have been trying to get pregnant, but have not been successful. She has been so afraid that she will never...
Okay, can someone please tell me what I am doing wrong?? I will show the code...
Okay, can someone please tell me what I am doing wrong?? I will show the code I submitted for the assignment. However, according to my instructor I did it incorrectly but I am not understanding why. I will show the instructor's comment after providing my original code for the assignment. Thank you in advance. * * * * * HourlyTest Class * * * * * import java.util.Scanner; public class HourlyTest {    public static void main(String[] args)     {        ...
How can I solve this problem? Can you please show step by step how to solve...
How can I solve this problem? Can you please show step by step how to solve this? Qd = 2,000 − 10P MC = 0.1Q
Can anyone explain to me how I solve this, I need to prepare a journal entry...
Can anyone explain to me how I solve this, I need to prepare a journal entry for the given problem: on jan 1 a corporation issued $325,000, 5.5%, 9 year bonds when the market rate was 6%. Interest is to be paid annually on each Jan 1
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT