##### Question

In: Statistics and Probability

# Within a school district, students were randomly assigned to one of two Math teachers - Mrs....

1. Within a school district, students were randomly assigned to one of two Math teachers - Mrs. Smith and Mrs. Jones. After the assignment, Mrs. Smith had 30 students, and Mrs. Jones had 25 students. At the end of the year, each class took the same standardized test. Mrs. Smith's students had an average test score of 78, with a standard deviation of 10; and Mrs. Jones' students had an average test score of 85, with a standard deviation of 15. Assume the variances are equal. At the significance level 0.10, can we conclude that Mrs. Jones is a more effective teacher than Mrs. Smith?

a). Calculate the test statistic. (R code and R result).

b). Find the p-value (R code and R result).

## Solutions

##### Expert Solution

We want to test that Mrs. Jones is a more effective teacher than Mrs. Smith.

U1:- Mrs. Smith's students average test score

U2:-  Mrs. Jones' students average test score

We want to test Mrs. Jones is a more effective teacher than Mrs. Smith. ie. Mr.Jones have higher average scores.

The null & alternative Hypothesis:

Ho: U1 =U2

VS

Ha: U1<U2

a)

> # m1, m2: the sample means
> # s1, s2: the sample standard deviations
> # n1, n2: the same sizes
>
>
> n1<-30;n2<-25
> m1<-78;m2<-85
> s1<-10;s2<-15
> alpha=0.10
>
>
> # pooled standard deviation, scaled by the sample sizes
> se <- sqrt( ((1/n1) + (1/n2)) * (((n1-1)*s1^2) + ((n2-1)*s2^2))/(n1+n2-2) )
> df <- n1+n2-2
>
> # The test statistic:
>
> t <- (m1-m2)/se
>
> t
 -2.0656
>
>

b)
> # p-value
> pt(t,df)
 0.02188548

c)

P-value = 0.02 < 0.10(level of significance)

So we reject Ho.

we may conclude that the data provide suficient evidence to connclude that the Mrs. Jones is a more effective teacher than Mrs. Smith.

***********R code ************

# m1, m2: the sample means
# s1, s2: the sample standard deviations
# n1, n2: the same sizes

n1<-30;n2<-25
m1<-78;m2<-85
s1<-10;s2<-15
alpha=0.10

# pooled standard deviation, scaled by the sample sizes
se <- sqrt( ((1/n1) + (1/n2)) * (((n1-1)*s1^2) + ((n2-1)*s2^2))/(n1+n2-2) )
df <- n1+n2-2

# The test statistic:

t <- (m1-m2)/se

t

# p-value
pt(t,df)

********* using a Function *********

# R code for left tailed test#

# m1, m2: the sample means
# s1, s2: the sample standard deviations
# n1, n2: the same sizes

# m0: the null value for the difference in means to be tested for. Default is 0.
# Alternative is
# equal.variance: whether or not to assume equal variance. Default is FALSE.
t.test2 <- function(m1,m2,s1,s2,n1,n2,m0=0,equal.variance=FALSE)
{
if( equal.variance==FALSE )
{
se <- sqrt( (s1^2/n1) + (s2^2/n2) )
# welch-satterthwaite df
df <- ( (s1^2/n1 + s2^2/n2)^2 )/( (s1^2/n1)^2/(n1-1) + (s2^2/n2)^2/(n2-1) )
} else
{
# pooled standard deviation, scaled by the sample sizes
se <- sqrt( (1/n1 + 1/n2) * ((n1-1)*s1^2 + (n2-1)*s2^2)/(n1+n2-2) )
df <- n1+n2-2
}
t <- (m1-m2-m0)/se
dat <- c(m1-m2, se, t, pt(t,df))
names(dat) <- c("Difference of means", "Std Error", "t", "p-value")
return(dat)
}

# you'll find this output agrees with that of t.test when you input x1,x2
t.test2( m1, m2, s1, s2, n1, n2,equal.variance=TRUE)

## Related Solutions

##### A school district developed an after-school math tutoring program for high school students. To assess the...
A school district developed an after-school math tutoring program for high school students. To assess the effectiveness of the program, struggling students were randomly selected into treatment and control groups. A pre-test was given to both groups before the start of the program. A post-test assessing the same skills was given after the end of the program. The study team determined the effectiveness of the program by comparing the average change in pre- and post-test scores between the two groups....
##### 12.16.  Randomly selected groups of 120 parents and 150 teachers from one school district are surveyed about...
12.16.  Randomly selected groups of 120 parents and 150 teachers from one school district are surveyed about their attitudes toward inclusion. One of the questions asks them whether they oppose or support inclusions and their responses to this question are recorded in the following table. The data were analyzed using a chi square test. The obtained chi square value is 5.65, significant at the .02 level (p=.02). GROUP SUPPORT OPPOSE Parent 75 45 Teachers 72 78 a.             Which chi square test should...
##### Students in a biology class have been randomly assigned to one of the two mentors for...
Students in a biology class have been randomly assigned to one of the two mentors for the laboratory portion of the class. A random sample of final examination scores has been selected from students supervised by each mentor, with the following results: Mentor A: 78, 78, 71, 89, 80, 93, 73, 76 Mentor B: 74, 81, 65, 73, 80, 63, 71, 64, 50, 80 At the 0.05 significance level, is there a difference in the mean scores?
##### In one school district, there are 89 elementary school (K-5) teachers, of which 18 are male (or male-identifying).
In one school district, there are 89 elementary school (K-5) teachers, of which 18 are male (or male-identifying). In a neighboring school district, there are 102 elementary teachers, of which 17 are male. A policy researcher would like to calculate the 99% confidence interval for the difference in proportions of male teachers.To keep the signs consistent for this problem, we will calculate all differences as p1−p2. That is, start with the percentage from the first school district and then subtract...
##### Fremont High School has 2100 students. One of the statistics teachers at the school is interested...
Fremont High School has 2100 students. One of the statistics teachers at the school is interested in whether an intervention program based on self-management improves attendance. They randomly choose 80 students and randomly assign half of them to either an experimental condition (self- management class) or a control condition (distractor class on popular culture). At the end of the semester, they measure the number of days missed for each student. The teacher expects that the students in the self-management class...
##### Students in an introductory economics course were assigned to practical classes taught by various assistant teachers....
Students in an introductory economics course were assigned to practical classes taught by various assistant teachers. The 21 students in the class of one of the assistant teachers obtained an average score of 59.6 in the final exam and a standard deviation of 5.0. The 18 of the second obtained an average score in the final exam of 85.2 and a standard deviation of 13.1. Suppose these data can be considered independent random samples from populations that follow a normal...
##### Conduct a one way between subjects ANOVA using SPSS Students were randomly assigned to attend an...
Conduct a one way between subjects ANOVA using SPSS Students were randomly assigned to attend an ANOVA lecture that contains one of the following approaches to instructions. 1) Mathematical, 2) Conceptual, 3) Conceptual and Mathematical. After the lecture, each student took an ANOVA exam. The table below displays the scores by condition for each student. Are there any significant differences between the groups? Mathematical Conceptual Conceptual and Mathematical 75 80 95 81 92 97 93 91 87 90 73 96...
##### Salaries for teachers in a particular elementary school district are normally distributed with a mean of...
Salaries for teachers in a particular elementary school district are normally distributed with a mean of $44,000 and a standard deviation of$6,500. We randomly survey ten teachers from that district. 1.Find the probability that the teachers earn a total of over $400,000 2.If we surveyed 70 teachers instead of ten, graphically, how would that change the distribution in part d? 3.If each of the 70 teachers received a$3,000 raise, graphically, how would that change the distribution in part...
##### Salaries for teachers in a particular elementary school district are normally distributed with a mean of...
Salaries for teachers in a particular elementary school district are normally distributed with a mean of $44,000 and a standard deviation of$6,500. We randomly survey ten teachers from that district. Find the 85th percentile for the sum of the sampled teacher's salaries to 2 decimal places.
##### Salaries for teachers in a particular elementary school district are normally distributed with a mean of...
Salaries for teachers in a particular elementary school district are normally distributed with a mean of $41,000 and a standard deviation of$6,100. We randomly survey ten teachers from that district. A. Give the distribution of ΣX. (Round your answers to two decimal places.) ΣX - N ( , ) B. Find the probability that the teachers earn a total of over \$400,000. (Round your answer to four decimal places.) C. Find the 80th percentile for an individual teacher's salary....