Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Uinthe sotwre toyou pefer perfim a mwosmple - for hferece berween mneanse o spec

ID: 2949507 • Letter: U

Question

Uinthe sotwre toyou pefer perfim a mwosmple - for hferece berween mneanse o species of irises have different sepal lengths. You may find this list of software manuals helpful in computing your answers. Click to download the data in your preferred format. Crunchlt! CSV Excel JMP Mac Text Minitab PC Text R SPSS TI Calc Calculate the positive t-staisic. Exrs our answer to three decimal places Enter numeric value Calculate the p-value. Express your answer to four decimal places p-value- What conclusion can you draw about the mean sepal length for each species of iris? Use the significance level of a 005to make your decision. Because the a 0.05, you 1S the null hypothesis that the mean sepal lengths are equal. There is evidence to conclude that Answer Bank equal togreater than the means are the samerejectfail to reject1-statisticthe means are different less thaninsufficient

Explanation / Answer

Sol:
Used R

dataset is iris

Rcode to view:

glimpse(iris)


Observations: 150
Variables: 5
$ Sepal.Length <dbl> 5.1, 4.9, 4.7, 4.6, 5.0, 5.4, 4.6, 5.0, 4.4, 4.9, 5.4, 4.8, 4.8, 4.3, 5.8,...
$ Sepal.Width <dbl> 3.5, 3.0, 3.2, 3.1, 3.6, 3.9, 3.4, 3.4, 2.9, 3.1, 3.7, 3.4, 3.0, 3.0, 4.0,...
$ Petal.Length <dbl> 1.4, 1.4, 1.3, 1.5, 1.4, 1.7, 1.4, 1.5, 1.4, 1.5, 1.5, 1.6, 1.4, 1.1, 1.2,...
$ Petal.Width <dbl> 0.2, 0.2, 0.2, 0.2, 0.2, 0.4, 0.3, 0.2, 0.2, 0.1, 0.2, 0.2, 0.1, 0.1, 0.2,...
$ Species <fct> setosa, setosa, setosa, setosa, setosa, setosa, setosa, setosa, setosa, se...

Rcode to get the subsets of sepal lengths based on species

setosa_seplen <- iris%>%
select (Sepal.Length, Species ) %>%
filter(Species == "setosa")
setosa_septlen
glimpse(iris)

virginica_seplen <- iris%>%
select (Sepal.Length, Species ) %>%
filter(Species == "virginica")


dim(virginica_seplen)
dim(setosa_seplen)

Output: dim(virginica_seplen)
[1] 50 2
> dim(setosa_seplen)
[1] 50 2

to Perform t test for sepal lengths of setosa and vriginica.(alpha=0.05)

t.test(setosa_petlen$Sepal.Length,virginica_seplen$Sepal.Length)

output:

Welch Two Sample t-test

data: setosa_petlen$Sepal.Length and virginica_seplen$Sepal.Length
t = -15.386, df = 76.516, p-value < 2.2e-16
alternative hypothesis: true difference in means is not equal to 0
95 percent confidence interval:
-1.78676 -1.37724
sample estimates:
mean of x mean of y
5.006 6.588

COMING TO ANSWERS:

t=-15.386

From output p< 2.2e-16

p value=0.0000

Because p value is less than alpha=0.05,you reject the null hypothesis that the mean sepal lengths are equal.There is sufficient evidence to conclude that the means are different.