During a particular baseball trout, 8 baseball players were given 40 pitches each. Of each player’s 40 pitches, 20 pitches came from left-handed pitchers and 20 came from right-handed pitchers. Of the 20 pitches that each player saw from each of the pitchers, 10 pitches were curve balls and 10 pitches were fastballs. The number of base hits that each player had under each condition was recorded. Use RStudio to accomplish the following steps of a two-factor repeated-measures ANOVA, with with α = 0.05 and: Factor A: PitchHand (A1: Left, A2: Right) Factor B: PitchType (B1: Curve, B2: Fastball) (a) use RStudio to calculate and print the total for each AB condition, the overall totals for each level of Factors A and B, and the totals for each subject. Use the xtabs() function to tabulate the totals for each subject. (b) Use RStudio to calculate all of the necessary sum of squares terms necessary for your analysis (SSTotal, SSA, SSB, SSS, SSAxB, SSerrorA, SSerrorB, SSerrorAB), as well as the corresponding degrees of freedom. Print the sum of squares values. (c) Use RStudio to calculate and print all mean square terms (MSA, MSB, MSS, MSAxB, MSerrorA, MSerrorB, MSerrorAB), each F-statistic (FA, FB, FS, FAxB), and all four critical F-values. Also find the p-values for each associated F-statistic. (d) Interpret the results (regarding main effects and interaction). (e) Use the aov() function to run the same two-factor repeated-measures ANOVA to verify your results above. Use the summary() function to print the results of your aov() call. (f) Use RStudio to plot the difference in means. Mean number of hits should be represented on the y-axis and pitch type (Curve, Fastball) should be represented on the x-axis.

MATLAB: An Introduction with Applications
6th Edition
ISBN:9781119256830
Author:Amos Gilat
Publisher:Amos Gilat
Chapter1: Starting With Matlab
Section: Chapter Questions
Problem 1P
icon
Related questions
Question
During a particular baseball trout, 8 baseball players were given 40 pitches each. Of each player’s 40 pitches, 20 pitches came from left-handed pitchers and 20 came from right-handed pitchers. Of the 20 pitches that each player saw from each of the pitchers, 10 pitches were curve balls and 10 pitches were fastballs. The number of base hits that each player had under each condition was recorded. Use RStudio to accomplish the following steps of a two-factor repeated-measures ANOVA, with with α = 0.05 and: Factor A: PitchHand (A1: Left, A2: Right) Factor B: PitchType (B1: Curve, B2: Fastball) (a) use RStudio to calculate and print the total for each AB condition, the overall totals for each level of Factors A and B, and the totals for each subject. Use the xtabs() function to tabulate the totals for each subject. (b) Use RStudio to calculate all of the necessary sum of squares terms necessary for your analysis (SSTotal, SSA, SSB, SSS, SSAxB, SSerrorA, SSerrorB, SSerrorAB), as well as the corresponding degrees of freedom. Print the sum of squares values. (c) Use RStudio to calculate and print all mean square terms (MSA, MSB, MSS, MSAxB, MSerrorA, MSerrorB, MSerrorAB), each F-statistic (FA, FB, FS, FAxB), and all four critical F-values. Also find the p-values for each associated F-statistic. (d) Interpret the results (regarding main effects and interaction). (e) Use the aov() function to run the same two-factor repeated-measures ANOVA to verify your results above. Use the summary() function to print the results of your aov() call. (f) Use RStudio to plot the difference in means. Mean number of hits should be represented on the y-axis and pitch type (Curve, Fastball) should be represented on the x-axis.
Player PitchHand PitchType Hits
Curve
Curve
Curve
Curve
1 Left
2 Left
3 Left
4 Left
5 Left
6 Left
7 Left
8 Left
1 Left
2 Left
3
Left
4 Left
5 Left
6 Left
7 Left
8 Left
1 Right
2 Right
3 Right
4 Right
5 Right
6 Right
7 Right
8 Right
1 Right
2 Right
3 Right
4 Right
5 Right
6 Right
7 Right
8 Right
Curve
Curve
Curve
Curve
Fastball
Fastball
Fastball
Fastball
Fastball
Fastball
Fastball
Fastball
Curve
Curve
Curve
Curve
Curve
Curve
Curve
Curve
Fastball
Fastball
Fastball
Fastball
Fastball
Fastball
Fastball
Fastball
5
ܘ ܗ ܚ ܗ ܚ ܥ ܗ ܗ ܙ ܗ ܗ ܗ ܗ ܗ ܙ ܗ ܗ ܟ ܗ ܟ ܙ
5
6
3
4
7
5
5
5
6
7
4
5
4
7
6
∞∞05676
8
8
4
Transcribed Image Text:Player PitchHand PitchType Hits Curve Curve Curve Curve 1 Left 2 Left 3 Left 4 Left 5 Left 6 Left 7 Left 8 Left 1 Left 2 Left 3 Left 4 Left 5 Left 6 Left 7 Left 8 Left 1 Right 2 Right 3 Right 4 Right 5 Right 6 Right 7 Right 8 Right 1 Right 2 Right 3 Right 4 Right 5 Right 6 Right 7 Right 8 Right Curve Curve Curve Curve Fastball Fastball Fastball Fastball Fastball Fastball Fastball Fastball Curve Curve Curve Curve Curve Curve Curve Curve Fastball Fastball Fastball Fastball Fastball Fastball Fastball Fastball 5 ܘ ܗ ܚ ܗ ܚ ܥ ܗ ܗ ܙ ܗ ܗ ܗ ܗ ܗ ܙ ܗ ܗ ܟ ܗ ܟ ܙ 5 6 3 4 7 5 5 5 6 7 4 5 4 7 6 ∞∞05676 8 8 4
Expert Solution
steps

Step by step

Solved in 7 steps

Blurred answer
Similar questions
Recommended textbooks for you
MATLAB: An Introduction with Applications
MATLAB: An Introduction with Applications
Statistics
ISBN:
9781119256830
Author:
Amos Gilat
Publisher:
John Wiley & Sons Inc
Probability and Statistics for Engineering and th…
Probability and Statistics for Engineering and th…
Statistics
ISBN:
9781305251809
Author:
Jay L. Devore
Publisher:
Cengage Learning
Statistics for The Behavioral Sciences (MindTap C…
Statistics for The Behavioral Sciences (MindTap C…
Statistics
ISBN:
9781305504912
Author:
Frederick J Gravetter, Larry B. Wallnau
Publisher:
Cengage Learning
Elementary Statistics: Picturing the World (7th E…
Elementary Statistics: Picturing the World (7th E…
Statistics
ISBN:
9780134683416
Author:
Ron Larson, Betsy Farber
Publisher:
PEARSON
The Basic Practice of Statistics
The Basic Practice of Statistics
Statistics
ISBN:
9781319042578
Author:
David S. Moore, William I. Notz, Michael A. Fligner
Publisher:
W. H. Freeman
Introduction to the Practice of Statistics
Introduction to the Practice of Statistics
Statistics
ISBN:
9781319013387
Author:
David S. Moore, George P. McCabe, Bruce A. Craig
Publisher:
W. H. Freeman