Data

## Warning: package 'readxl' was built under R version 4.2.3
## # A tibble: 163 × 33
##      Age Gender Course T…¹   In1   In2   In3   In4   In5   In6   In7   In8   Ex1
##    <dbl> <chr>  <chr>      <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
##  1    22 Female BS Mathem…     4     3     2     1     4     7     6     7     4
##  2    23 Female BS Biology     6     6     4     4     4     5     4     7     4
##  3    20 Female BSED Engl…     5     5     3     3     2     6     5     7     5
##  4    22 Female BSED Biol…     4     5     4     3     3     6     6     7     5
##  5    23 Male   BSED Engl…     7     6     5     5     4     6     4     7     7
##  6    22 Female BSED Biol…     6     6     6     6     6     7     7     7     7
##  7    20 Male   BS Civil …     4     5     6     2     5     7     4     1     7
##  8    21 Female BS Electr…     5     6     5     6     5     7     6     7     7
##  9    21 Female BS Mathem…     6     7     5     5     5     7     7     7     7
## 10    22 Male   BS Biology     6     7     5     6     7     7     7     7     5
## # … with 153 more rows, 21 more variables: Ex2 <dbl>, Ex3 <dbl>, Ex4 <dbl>,
## #   Ex5 <dbl>, Ex6 <dbl>, Ex7 <dbl>, Ex8 <dbl>, Ex9 <dbl>, Ex10 <dbl>,
## #   Ex11 <dbl>, TP1 <dbl>, TP2 <dbl>, TP3 <dbl>, TP4 <dbl>, TP5 <dbl>,
## #   T6 <dbl>, CP1 <dbl>, CP2 <dbl>, CP3 <dbl>, CP4 <dbl>, CP5 <dbl>, and
## #   abbreviated variable name ¹​`Course Taken`

Answer as indicated

1. Provide the same output provided below

1.1 First output:

## 
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
## 
##     filter, lag
## The following objects are masked from 'package:base':
## 
##     intersect, setdiff, setequal, union
## # A tibble: 6 × 4
##   `Course Taken`            Frequency `Mean Age` `Standard Deviation of Age`
##   <chr>                         <int>      <dbl>                       <dbl>
## 1 BS Biology                       33       21.6                       0.751
## 2 BS Civil Engineering             16       21.4                       0.727
## 3 BS Electrical Engineering        17       21.6                       0.618
## 4 BS Mathematics                   33       21.7                       0.924
## 5 BSED Biology                     32       21.5                       0.803
## 6 BSED English                     32       21.6                       0.878

1.2 Second output:

Consider the variables: In4, Ex3, TP3, and CP3 that are grouped according to “course taken”

## # A tibble: 6 × 6
##   `Course Taken`            Frequency `Mean Intrinsic5` Mean E…¹ Mean …² Mean …³
##   <chr>                         <int>             <dbl>    <dbl>   <dbl>   <dbl>
## 1 BS Biology                       33              4.94     5.27    3.88   NA   
## 2 BS Civil Engineering             16              4.06     5.5     3.31    4.38
## 3 BS Electrical Engineering        17              4.35     5       3.47    3.71
## 4 BS Mathematics                   33              4.27     5.39    3.55    3.52
## 5 BSED Biology                     32              4.34     5.22    3.25    3.62
## 6 BSED English                     32              4.19     5.66    3.91    3.03
## # … with abbreviated variable names ¹​`Mean Extrinsic4`, ²​`Mean TP3`,
## #   ³​`Mean CP2`

Recoding the responses in Variables “In3 and In4” with the following changes

“1” for “Strongly Disagree”
“2” for “Disagree”
“3” for “Moderately Disagree”
“4” for “Neutral”
“5” for “Moderately Agree”
“6” for “Agree”
“7” for “Strongly Agree”

2.1 Answer the following:

a. How many observations in Variable In3 that are strongly agree and at the same time moderately disagree in variable In4?

## Warning: package 'gmodels' was built under R version 4.2.3
## 
##  
##    Cell Contents
## |-------------------------|
## |                       N |
## | Chi-square contribution |
## |           N / Row Total |
## |           N / Col Total |
## |         N / Table Total |
## |-------------------------|
## 
##  
## Total Observations in Table:  163 
## 
##  
##                     | FData$In4.1 
##         FData$In3.1 |               Agree |            Disagree |    Moderately Agree | Moderately Disagree |             Neutral |      Strongly Agree |   Strongly Disagree |           Row Total | 
## --------------------|---------------------|---------------------|---------------------|---------------------|---------------------|---------------------|---------------------|---------------------|
##               Agree |                  26 |                   0 |                   2 |                   0 |                   0 |                   9 |                   0 |                  37 | 
##                     |              11.254 |               0.681 |               7.263 |               1.135 |               2.497 |               0.213 |               0.454 |                     | 
##                     |               0.703 |               0.000 |               0.054 |               0.000 |               0.000 |               0.243 |               0.000 |               0.227 | 
##                     |               0.433 |               0.000 |               0.042 |               0.000 |               0.000 |               0.265 |               0.000 |                     | 
##                     |               0.160 |               0.000 |               0.012 |               0.000 |               0.000 |               0.055 |               0.000 |                     | 
## --------------------|---------------------|---------------------|---------------------|---------------------|---------------------|---------------------|---------------------|---------------------|
##            Disagree |                   0 |                   1 |                   2 |                   1 |                   0 |                   0 |                   0 |                   4 | 
##                     |               1.472 |              11.657 |               0.574 |               6.273 |               0.270 |               0.834 |               0.049 |                     | 
##                     |               0.000 |               0.250 |               0.500 |               0.250 |               0.000 |               0.000 |               0.000 |               0.025 | 
##                     |               0.000 |               0.333 |               0.042 |               0.200 |               0.000 |               0.000 |               0.000 |                     | 
##                     |               0.000 |               0.006 |               0.012 |               0.006 |               0.000 |               0.000 |               0.000 |                     | 
## --------------------|---------------------|---------------------|---------------------|---------------------|---------------------|---------------------|---------------------|---------------------|
##    Moderately Agree |                  20 |                   0 |                  17 |                   1 |                   2 |                   7 |                   0 |                  47 | 
##                     |               0.421 |               0.865 |               0.721 |               0.135 |               0.433 |               0.802 |               0.577 |                     | 
##                     |               0.426 |               0.000 |               0.362 |               0.021 |               0.043 |               0.149 |               0.000 |               0.288 | 
##                     |               0.333 |               0.000 |               0.354 |               0.200 |               0.182 |               0.206 |               0.000 |                     | 
##                     |               0.123 |               0.000 |               0.104 |               0.006 |               0.012 |               0.043 |               0.000 |                     | 
## --------------------|---------------------|---------------------|---------------------|---------------------|---------------------|---------------------|---------------------|---------------------|
## Moderately Disagree |                   0 |                   0 |                   4 |                   1 |                   0 |                   1 |                   0 |                   6 | 
##                     |               2.209 |               0.110 |               2.822 |               3.617 |               0.405 |               0.051 |               0.074 |                     | 
##                     |               0.000 |               0.000 |               0.667 |               0.167 |               0.000 |               0.167 |               0.000 |               0.037 | 
##                     |               0.000 |               0.000 |               0.083 |               0.200 |               0.000 |               0.029 |               0.000 |                     | 
##                     |               0.000 |               0.000 |               0.025 |               0.006 |               0.000 |               0.006 |               0.000 |                     | 
## --------------------|---------------------|---------------------|---------------------|---------------------|---------------------|---------------------|---------------------|---------------------|
##             Neutral |                   9 |                   2 |                  22 |                   1 |                   8 |                   3 |                   0 |                  45 | 
##                     |               3.454 |               1.658 |               5.776 |               0.105 |               8.112 |               4.345 |               0.552 |                     | 
##                     |               0.200 |               0.044 |               0.489 |               0.022 |               0.178 |               0.067 |               0.000 |               0.276 | 
##                     |               0.150 |               0.667 |               0.458 |               0.200 |               0.727 |               0.088 |               0.000 |                     | 
##                     |               0.055 |               0.012 |               0.135 |               0.006 |               0.049 |               0.018 |               0.000 |                     | 
## --------------------|---------------------|---------------------|---------------------|---------------------|---------------------|---------------------|---------------------|---------------------|
##      Strongly Agree |                   5 |                   0 |                   1 |                   0 |                   0 |                  13 |                   0 |                  19 | 
##                     |               0.568 |               0.350 |               3.774 |               0.583 |               1.282 |              20.606 |               0.233 |                     | 
##                     |               0.263 |               0.000 |               0.053 |               0.000 |               0.000 |               0.684 |               0.000 |               0.117 | 
##                     |               0.083 |               0.000 |               0.021 |               0.000 |               0.000 |               0.382 |               0.000 |                     | 
##                     |               0.031 |               0.000 |               0.006 |               0.000 |               0.000 |               0.080 |               0.000 |                     | 
## --------------------|---------------------|---------------------|---------------------|---------------------|---------------------|---------------------|---------------------|---------------------|
##   Strongly Disagree |                   0 |                   0 |                   0 |                   1 |                   1 |                   1 |                   2 |                   5 | 
##                     |               1.840 |               0.092 |               1.472 |               4.673 |               1.301 |               0.002 |              61.261 |                     | 
##                     |               0.000 |               0.000 |               0.000 |               0.200 |               0.200 |               0.200 |               0.400 |               0.031 | 
##                     |               0.000 |               0.000 |               0.000 |               0.200 |               0.091 |               0.029 |               1.000 |                     | 
##                     |               0.000 |               0.000 |               0.000 |               0.006 |               0.006 |               0.006 |               0.012 |                     | 
## --------------------|---------------------|---------------------|---------------------|---------------------|---------------------|---------------------|---------------------|---------------------|
##        Column Total |                  60 |                   3 |                  48 |                   5 |                  11 |                  34 |                   2 |                 163 | 
##                     |               0.368 |               0.018 |               0.294 |               0.031 |               0.067 |               0.209 |               0.012 |                     | 
## --------------------|---------------------|---------------------|---------------------|---------------------|---------------------|---------------------|---------------------|---------------------|
## 
## 
## $t
##                      y
## x                     Agree Disagree Moderately Agree Moderately Disagree
##   Agree                  26        0                2                   0
##   Disagree                0        1                2                   1
##   Moderately Agree       20        0               17                   1
##   Moderately Disagree     0        0                4                   1
##   Neutral                 9        2               22                   1
##   Strongly Agree          5        0                1                   0
##   Strongly Disagree       0        0                0                   1
##                      y
## x                     Neutral Strongly Agree Strongly Disagree
##   Agree                     0              9                 0
##   Disagree                  0              0                 0
##   Moderately Agree          2              7                 0
##   Moderately Disagree       0              1                 0
##   Neutral                   8              3                 0
##   Strongly Agree            0             13                 0
##   Strongly Disagree         1              1                 2
## 
## $prop.row
##                      y
## x                          Agree   Disagree Moderately Agree
##   Agree               0.70270270 0.00000000       0.05405405
##   Disagree            0.00000000 0.25000000       0.50000000
##   Moderately Agree    0.42553191 0.00000000       0.36170213
##   Moderately Disagree 0.00000000 0.00000000       0.66666667
##   Neutral             0.20000000 0.04444444       0.48888889
##   Strongly Agree      0.26315789 0.00000000       0.05263158
##   Strongly Disagree   0.00000000 0.00000000       0.00000000
##                      y
## x                     Moderately Disagree    Neutral Strongly Agree
##   Agree                        0.00000000 0.00000000     0.24324324
##   Disagree                     0.25000000 0.00000000     0.00000000
##   Moderately Agree             0.02127660 0.04255319     0.14893617
##   Moderately Disagree          0.16666667 0.00000000     0.16666667
##   Neutral                      0.02222222 0.17777778     0.06666667
##   Strongly Agree               0.00000000 0.00000000     0.68421053
##   Strongly Disagree            0.20000000 0.20000000     0.20000000
##                      y
## x                     Strongly Disagree
##   Agree                      0.00000000
##   Disagree                   0.00000000
##   Moderately Agree           0.00000000
##   Moderately Disagree        0.00000000
##   Neutral                    0.00000000
##   Strongly Agree             0.00000000
##   Strongly Disagree          0.40000000
## 
## $prop.col
##                      y
## x                          Agree   Disagree Moderately Agree
##   Agree               0.43333333 0.00000000       0.04166667
##   Disagree            0.00000000 0.33333333       0.04166667
##   Moderately Agree    0.33333333 0.00000000       0.35416667
##   Moderately Disagree 0.00000000 0.00000000       0.08333333
##   Neutral             0.15000000 0.66666667       0.45833333
##   Strongly Agree      0.08333333 0.00000000       0.02083333
##   Strongly Disagree   0.00000000 0.00000000       0.00000000
##                      y
## x                     Moderately Disagree    Neutral Strongly Agree
##   Agree                        0.00000000 0.00000000     0.26470588
##   Disagree                     0.20000000 0.00000000     0.00000000
##   Moderately Agree             0.20000000 0.18181818     0.20588235
##   Moderately Disagree          0.20000000 0.00000000     0.02941176
##   Neutral                      0.20000000 0.72727273     0.08823529
##   Strongly Agree               0.00000000 0.00000000     0.38235294
##   Strongly Disagree            0.20000000 0.09090909     0.02941176
##                      y
## x                     Strongly Disagree
##   Agree                      0.00000000
##   Disagree                   0.00000000
##   Moderately Agree           0.00000000
##   Moderately Disagree        0.00000000
##   Neutral                    0.00000000
##   Strongly Agree             0.00000000
##   Strongly Disagree          1.00000000
## 
## $prop.tbl
##                      y
## x                           Agree    Disagree Moderately Agree
##   Agree               0.159509202 0.000000000      0.012269939
##   Disagree            0.000000000 0.006134969      0.012269939
##   Moderately Agree    0.122699387 0.000000000      0.104294479
##   Moderately Disagree 0.000000000 0.000000000      0.024539877
##   Neutral             0.055214724 0.012269939      0.134969325
##   Strongly Agree      0.030674847 0.000000000      0.006134969
##   Strongly Disagree   0.000000000 0.000000000      0.000000000
##                      y
## x                     Moderately Disagree     Neutral Strongly Agree
##   Agree                       0.000000000 0.000000000    0.055214724
##   Disagree                    0.006134969 0.000000000    0.000000000
##   Moderately Agree            0.006134969 0.012269939    0.042944785
##   Moderately Disagree         0.006134969 0.000000000    0.006134969
##   Neutral                     0.006134969 0.049079755    0.018404908
##   Strongly Agree              0.000000000 0.000000000    0.079754601
##   Strongly Disagree           0.006134969 0.006134969    0.006134969
##                      y
## x                     Strongly Disagree
##   Agree                     0.000000000
##   Disagree                  0.000000000
##   Moderately Agree          0.000000000
##   Moderately Disagree       0.000000000
##   Neutral                   0.000000000
##   Strongly Agree            0.000000000
##   Strongly Disagree         0.012269939
## `summarise()` has grouped output by 'In3.1'. You can override using the
## `.groups` argument.

Answer: There are no variables from In3 that are strongly agree at the same time moderately disagree in In4.

b. How many observations in Variable In3 that are strongly agree and at the same time Neutral in variable In4?

## `summarise()` has grouped output by 'In3.1'. You can override using the
## `.groups` argument.

Answer: There are no variables in In3 that are strongly agree at the same time Neutral in In4.

3. Consider the following:

Make a new variable named as “InAverage”, InAverage is the average of the responses in the variables In1, In2, In3, In4, and In5.

Make two groups of the variable “Course Taken”,

Grouping:
Group 1 with courses: BS Civil Engineering, BS Electrical Engineering, ad BS Mathematics
Group 2: BS Biology, BSED Biology, and BSED English

## # A tibble: 163 × 38
##      Age Gender Course T…¹   In1   In2   In3   In4   In5   In6   In7   In8   Ex1
##    <dbl> <chr>  <chr>      <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
##  1    22 Female BS Mathem…     4     3     2     1     4     7     6     7     4
##  2    23 Female BS Biology     6     6     4     4     4     5     4     7     4
##  3    20 Female BSED Engl…     5     5     3     3     2     6     5     7     5
##  4    22 Female BSED Biol…     4     5     4     3     3     6     6     7     5
##  5    23 Male   BSED Engl…     7     6     5     5     4     6     4     7     7
##  6    22 Female BSED Biol…     6     6     6     6     6     7     7     7     7
##  7    20 Male   BS Civil …     4     5     6     2     5     7     4     1     7
##  8    21 Female BS Electr…     5     6     5     6     5     7     6     7     7
##  9    21 Female BS Mathem…     6     7     5     5     5     7     7     7     7
## 10    22 Male   BS Biology     6     7     5     6     7     7     7     7     5
## # … with 153 more rows, 26 more variables: Ex2 <dbl>, Ex3 <dbl>, Ex4 <dbl>,
## #   Ex5 <dbl>, Ex6 <dbl>, Ex7 <dbl>, Ex8 <dbl>, Ex9 <dbl>, Ex10 <dbl>,
## #   Ex11 <dbl>, TP1 <dbl>, TP2 <dbl>, TP3 <dbl>, TP4 <dbl>, TP5 <dbl>,
## #   T6 <dbl>, CP1 <dbl>, CP2 <dbl>, CP3 <dbl>, CP4 <dbl>, CP5 <dbl>,
## #   In3.1 <chr>, In4.1 <chr>, InAverage <dbl>, CTrecode <chr>,
## #   CourseTakenGroup <chr>, and abbreviated variable name ¹​`Course Taken`

3.1 Is there a significant difference between the two groups of Course Taken in terms of the variable “InAverage”?

## 
## Group1 Group2 
##     66     97

Checking the equality of variances

## 
##  F test to compare two variances
## 
## data:  Data1$InAverage by Data1$CourseTakenGroup
## F = 0.763, num df = 65, denom df = 96, p-value = 0.2458
## alternative hypothesis: true ratio of variances is not equal to 1
## 95 percent confidence interval:
##  0.4919799 1.2067147
## sample estimates:
## ratio of variances 
##           0.762995

Hypotheses:

Alternative: There is a significant difference between the two groups of course taken in terms of the variable “InAverage”.

Null: There is no significant difference between the two groups of course taken in terms of the variable “InAverage”.

## 
##  Two Sample t-test
## 
## data:  Data1$InAverage by Data1$CourseTakenGroup
## t = -0.050692, df = 161, p-value = 0.9596
## alternative hypothesis: true difference in means between group Group1 and group Group2 is not equal to 0
## 95 percent confidence interval:
##  -0.3582544  0.3403225
## sample estimates:
## mean in group Group1 mean in group Group2 
##             4.784848             4.793814

Interpretation:

Using Two Sample t-test, we obtain p-value=0.9596 which is greater than alpha=0.05 for 95% confidence level. As we observe,there is no significant difference between the two groups of course taken in terms of the variable “InAverage”. Thus, the null hypothesis is accepted.

4. Is there a significant difference among the courses taken in terms of the variable “InAverage”?

1.2 Answer this by including all the steps in hypothesis testing

Hypotheses:

Alternative: There is a significant difference among the courses taken in terms of the variable “InAverage”.

Null: There is no significant difference among the courses taken in terms of the variable “InAverage”.

## 
##                BS Biology      BS Civil Engineering BS Electrical Engineering 
##                        33                        16                        17 
##            BS Mathematics              BSED Biology              BSED English 
##                        33                        32                        32
##                 Df Sum Sq Mean Sq F value Pr(>F)
## `Course Taken`   5   1.96  0.3913   0.314  0.904
## Residuals      157 195.87  1.2476

Interpretation:

Since the result shows that we obtain p-value=0.9596 greater than alpha=0.05 for 95% confidence level. Thus, there is no significant difference among the courses taken in terms of the variable “InAverage”. Therefore, the null hypothesis is accepted.