
plz run in r studio n answer all the questions
biostats........ Worksheet T tests, Wilcoxon’s test, Mc Nemar’s Test
Answer the following questions using R studio and submit the MS
word format from via Moodle.
1. Test whether the marginal probabilities are the same or different
for the following dataset. Create the dataset by using the following
Scripts:
> set.seed(50)
>data <- data.frame(before = sample(c("Positive",
"Positive",
"Positive",
"Positive",
"Negative"),
250, replace = TRUE),
after = sample(c("Positive",
"Positive",
"Positive",
"Positive",
"Negative"),
250, replace = TRUE))
>data
Note: Prepare a contingency table using the table function, before
choosing and running your analysis.
2. The following data were recorded as independent observations
for heights (cm) of Guava Plants treated with NPK nutrients. We
want to know, if the average height of the these plants statistically
differs from 19 cm?
18.50, 18.55, 18.60, 18.65, 18.70, 18.75, 18.80, 18.85, 18.90,
18.95, 19.00, 19.05,19.10, 19.15, 19.20, 19.25, 19.30, 19.35, 19.40,
19.45, 19.50, 19.55, 19.60, 19.65,19.70, 19.75, 19.80, 19.85, 19.90,
19.95, 20.00, 20.05, 20.10, 20.15, 20.20, 20.25, 20.30, 20.35,
20.40, 20.45, 20.50
Choose the appropriate statistical test (s) to answer your questions
and determine if the hypothesis is left or right tailed.
3. Sample scores from a BIO3211 test yield these results from
tutorial sessions.
8,7,10,8,9,10,8,10,7,10,8,10,6,8,10,9,10,7,10,10,7,10,8,10,6,8,10,9,
10,7
Test whether there is a significant difference from the theoretical
value of a score of 7. Would the hypothesis be left or right tailed?
4. Test the Null hypothesis that the Dart scores from Group A is not
different from Group B and or Group A scores are greater than or
less than Group B.
Group A: 1,2,2,3,3,4,4,5,5,6
Group B: 1,2,4,5,5,5,6,6,7,9
5. The pre and post tests scores for a randomly selected group of
students before and after exposure to new teaching methods are
as follows:
Pretest: 10,5,8,6,4,5,5,8,7,6,10,5, 8,6,4,5,5,8,7,6
Posttest: 10,6,8,8,5,4,5,9,10,7, 8,5,4,5,9,10,7,10,6,8
Is there a significant difference in performance before compared to
after exposure to a different teaching method?
6. Results for blood glucose levels independently taken for the
same individuals before and after treatment with sucrose solution
to determine impacts of carbohydrates on blood sugar levels are
outlined below:
before : 200.1, 190.9, 192.7, 213, 241.4, 196.9, 172.2, 185.5, 205.2,
193.7
after : 392.9, 393.2, 345.1, 393, 434, 427.9, 422, 383.9, 392.3,
352.2
Select the appropriate test statistic to test the Null Hypothesis for
the that H0=H1.
7. Test the null hypothesis that Group 1 scores not Equal to Group
2 scores using the appropriate test statistics .
Group1= 19, 18, 9, 17, 8, 7, 16, 19, 20, 9, 11, 18
Group2= 16, 5, 15, 2, 14, 15, 4, 7, 15, 6, 7, 14
8. Choose and perform the appropriate statistical test for the
following two samples to determine if their populations means
differ significantly at a significance level of 0.05:
Population Sample 1: 14, 15, 15, 15, 16, 18, 22, 23, 24, 25, 25
Population Sample 2: 10, 12, 14, 15, 18, 22, 24, 27, 31, 33, 34, 34,
34
Before conducting any test statistics, check to see assumptions (Write up
each of the following)
1. Identify your variable parameters
2. State you Null and Alternate Hypotheses
3. Check your data using descriptive statistics. What does the summary
say about
your data? Plot a box plot to visualise of the data
4. Check the assumptions
5. Is this a large sample n>30?
6. Check whether the data follow a normal distribution by:
7. Plot a Histogram or Q-Q plot to visualise the data to check for normal
distribution
8. Conduct a formal normality test and state the Null and alternate
Hypotheses
9. Is the Test a two tailed, or one tailed (left tailed or right tailed)
10. Choose and run the appropriate test Statistics on the data
11. Interpret results and Accept/Reject your Null Hypothesis.
12. Write your conclusion as discussed in the lectures and include your
Hypothesis, p
valve (alpha value), test statistics and degrees of freedom (df).
13. Set all significance level at 0.05 or where appropriate for nonparametric tests
14. Do you understand how now how to choose the appropriate statistics
and why?
Explain in your own words for each of the statistical test you ran.

Trending nowThis is a popular solution!
Step by stepSolved in 4 steps with 3 images

- NEED HELP WITH THE THIRD PART ONLY. I ALREADY TRIED IT, BUT MY CODE DOESNT MATCH THE QUESTION, THIS IS LIKE MY 5th TIME TRYING THIS. KEEPS GETTING REJECTED.arrow_forwardUsing overload + to add total passengers and total calls and overload < to determine which taxi served most passengers. The company needs a more detailed report to be generated at the end of each shift.The sample screen output with the report is listed below: with private members taxi Id color,model, maker, passenger etc with 6 objects of class. And random selection of passenger and random selection of object. Welcome to CTC Taxi. Do you need a taxi? Y Taxi CTC0001 will pick you up in a few minutes. (Taxi CTC0001 determined that there were 3 passengers) Do you need a taxi? Y Taxi CTC0004 will pick you up in a few minutes. (Taxi CTC0004 determined that there were 5 passengers) …… …… Do you need a taxi? N CTC Taxi served a total of 124 passengers today. CTC0001 CTC00022 CTC0003 CTC0004 CTC0005 CTC0006 19 Calls 25 Calls 10 Calls 12 Calls 22 Calls 13…arrow_forwardComplete the docstring using the information attached (images):def upgrade_stations(threshold: int, num_bikes: int, stations: List["Station"]) -> int: """Modify each station in stations that has a capacity that is less than threshold by adding num_bikes to the capacity and bikes available counts. Modify each station at most once. Return the total number of bikes that were added to the bike share network. Precondition: num_bikes >= 0 >>> handout_copy = [HANDOUT_STATIONS[0][:], HANDOUT_STATIONS[1][:]] >>> upgrade_stations(25, 5, handout_copy) 5 >>> handout_copy[0] == HANDOUT_STATIONS[0] True >>> handout_copy[1] == [7001, 'Lower Jarvis St SMART / The Esplanade', \ 43.647992, -79.370907, 20, 10, 10] True """arrow_forward
- Don't try to copy other's work or don't use any AI platform to generate answer. If I see these things I'll give you multiple downvotes for sure and will report.arrow_forwardUse an appropriate scikit-learn library we used in class to create y_train, y_test, X_train and X_test by splitting the data into 70% train and 30% test datasets. Set random_state to 4 and stratify the subsamples so that train and test datasets have roughly equal proportions of the target's class labels Standardise the data using StandardScaler libraryarrow_forwardUsing array to assign 6 object of class The company needs a more detailed report to be generated at the end of each shift.The sample screen output with the report is listed below: with private members taxi Id color,model, maker and passengerwith 6 objects of class. And random selection of passenger and random selection of object. Welcome to CTC Taxi. Do you need a taxi? Y Taxi CTC0001 will pick you up in a few minutes. (Taxi CTC0001 determined that there were 3 passengers) Do you need a taxi? Y Taxi CTC0004 will pick you up in a few minutes. (Taxi CTC0004 determined that there were 5 passengers) …… …… Do you need a taxi? N CTC Taxi served a total of 124 passengers today. CTC0001 CTC00022 CTC0003 CTC0004 CTC0005 CTC0006 19 Calls 25 Calls 10 Calls 12 Calls 22 Calls 13 Calls 25 Passengers 45 Passengers 34 Passengers 29 Passengers 24…arrow_forward
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education





