Question

In: Statistics and Probability

The data set 2017NBADraft.txt is a comma delimited file containing data on the players selected in...

The data set 2017NBADraft.txt is a comma delimited file containing data on the players selected in the 2017 NBA draft. Assume this data set is a representative sample of all players in the NBA. Correctly import the data set into R.

c) In R, perform a hypothesis test to determine if the mean weights are different for the first round selections and second round selections. To do this, create a new variable so that the first 30 players all have the value of “First” and the second 30 players (observations 31 to 60) have the value of “Second.” Again, state the hypotheses, provide all R output, make a decision and draw a conclusion.

LastName,FirstName,Team,Position,Birthdate,Height,Wingspan,Weight
Fultz,Markelle,76ers,PG,05-29-98,76,81.75,195
Ball,Lonzo,Lakers,PG,10-27-97,78,79,190
Tatum,Jayson,Celtics,SF,03-03-98,80,83,204
Jackson,Josh,Suns,SF,02-10-97,80,81.75,203
Fox,De'Aaron,Kings,PG,12-20-97,76,78.5,171
Isaac,Jonathan,Magic,SF/PF,10-03-97,83,85.25,205
Markkanen,Lauri,Bulls,PF,05-22-97,84,,225
Ntilikina,Frank,Knicks,PG,07-28-98,77,,170
Smith,Dennis,Mavericks,PG,11-25-97,75,75,195
Collins,Zach,Trail Blazers,PF/C,11-19-97,84,85,230
Monk,Malik,Hornets,SG,02-04-98,76,75.5,197
Kennard,Luke,Pistons,SG,06-25-96,78,77.25,202
Mitchell,Donovan,Jazz,SG,09-07-96,75,82,210
Adebayo,Bam,Heat,C,07-18-97,82,86.75,250
Jackson,Justin,Kings,SF,03-28-95,80,83,193
Patton,Justin,Timberwolves,C,06-14-97,84,87,226
Wilson,D.J.,Bucks,PF,02-19-96,82,87,240
Leaf,T.J.,Pacers,PF,04-30-97,82,83,220
Collins,John,Hawks,PF,09-23-97,82,83.25,225
Giles,Harry,Kings,C,04-22-98,83,87.25,222
Ferguson,Terrance,Thunder,SG/SF,05-17-98,79,80.75,186
Allen,Jarrett,Nets,C,04-21-98,83,89.25,224
Anunoby,OG,Raptors,SF/PF,07-17-97,80,86.25,215
Lydon,Tyler,Nuggets,SF/PF,04-09-96,82,84,225
Pasecniks,Anzejs,76ers,C,12-20-95,86,,229
Swanigan,Caleb,Trail Blazers,PF/C,04-18-97,81,87,247
Kuzma,Kyle,Lakers,PF,07-24-95,81,84.25,221
Bradley,Tony,Jazz,C,01-08-98,82,89,248
White,Derrick,Spurs,PG/SG,07-02-94,77,79.5,200
Hart,Josh,Lakers,SG,03-06-95,78,80.25,204
Jackson,Frank,Pelicans,SG,05-04-98,76,79.5,208
Reed,Davon,Suns,SG,06-11-95,78,84,208
Iwundu,Wesley,Magic,SG,12-20-94,79,85,205
Mason,Frank,Kings,PG,04-03-94,71,75.25,185
Rabb,Ivan,Grizzlies,PF/C,02-04-97,82,85.5,215
Bolden,Jonah,76ers,PF,01-02-96,82,,227
Ojeleye,Semi,Celtics,SF/PF,12-05-94,79,81.75,235
Bell,Jordan,Warriors,PF,01-07-95,81,83.75,227
Evans,Juwan,Clippers,PG,07-26-96,73,77.5,177
Bacon,Dwayne,Hornets,SF,08-30-95,77,82,202
Dorsey,Tyler,Hawks,SG,02-14-96,76,77.25,180
Bryant,Thomas,Lakers,C,07-31-97,82,90,241
Hartenstein,Isaiah,Rockets,PF/C,05-05-98,84,86.25,225
Dotson,Damyean,Knicks,SG,05-06-94,77,71,202
Brooks,Dillon,Grizzlies,SF,01-22-96,79,78,215
Brown,Sterling,Bucks,SG,02-10-95,78,81.5,230
Anigbogu,Ike,Pacers,C,10-22-98,82,90.25,230
Thornwell,Sindarius,Clippers,SG,11-15-94,77,82,214
Cancar,Vlatko,Nuggets,PF,04-10-97,80,83,210
Lessort,Mathias,76ers,PF/C,09-29-95,81,,250
Morris,Monte,Nuggets,PG,06-27-95,75,76,175
Sumner,Edmond,Pacers,PG,12-31-95,77,81,170
Allen,Kadeem,Celtics,PG,01-15-93,75,81.25,200
Peters,Alec,Suns,PF,04-13-95,81,82.75,225
Williams-Goss,Nigel,Jazz,PG,09-16-94,76,79.25,182
Bird,Jabari,Celtics,SG,07-03-94,78,80,199
Vezenkov,Aleksandar,Nets,SF/PF,08-06-95,81,,225
Jaramaz,Ognjen,Knicks,PG,09-01-95,76,77.5,193
Blossomgame,Jaron,Spurs,SF/PF,09-16-93,79,82,214
Kaba,Alpha,Hawks,C,09-21-96,82,89.25,226

LastName,FirstName,Team,Position,Birthdate,Height,Wingspan,Weight,College,Year
Fultz,Markelle,76ers,PG,05-29-98,76,81.75,195,Yes,Freshman
Ball,Lonzo,Lakers,PG,10-27-97,78,79,190,Yes,Freshman
Tatum,Jayson,Celtics,SF,03-03-98,80,83,204,Yes,Freshman
Jackson,Josh,Suns,SF,02-10-97,80,81.75,203,Yes,Freshman
Fox,"De'Aaron",Kings,PG,12-20-97,76,78.5,171,Yes,Freshman
Isaac,Jonathan,Magic,SF,10-03-97,83,85.25,205,Yes,Freshman
Markkanen,Lauri,Bulls,PF,05-22-97,84,,225,Yes,Freshman
Ntilikina,Frank,Knicks,PG,07-28-98,77,,170,No,
Smith,Dennis,Mavericks,PG,11-25-97,75,75,195,Yes,Freshman
Collins,Zach,Trail Blazers,C,11-19-97,84,85,230,Yes,Freshman
Monk,Malik,Hornets,SG,02-04-98,76,75.5,197,Yes,Freshman
Kennard,Luke,Pistons,SG,06-25-96,78,77.25,202,Yes,Sophomore
Mitchell,Donovan,Jazz,SG,09-07-96,75,82,210,Yes,Sophomore
Adebayo,Bam,Heat,C,07-18-97,82,86.75,250,Yes,Freshman
Jackson,Justin,Kings,SF,03-28-95,80,83,193,Yes,Junior
Patton,Justin,Timberwolves,C,06-14-97,84,87,226,Yes,Freshman
Wilson,D.J.,Bucks,PF,02-19-96,82,87,240,Yes,Junior
Leaf,T.J.,Pacers,PF,04-30-97,82,83,220,Yes,Freshman
Collins,John,Hawks,PF,09-23-97,82,83.25,225,Yes,Sophomore
Giles,Harry,Kings,C,04-22-98,83,87.25,222,Yes,Freshman
Ferguson,Terrance,Thunder,SG,05-17-98,79,80.75,186,No,
Allen,Jarrett,Nets,C,04-21-98,83,89.25,224,Yes,Freshman
Anunoby,OG,Raptors,PF,07-17-97,80,86.25,215,Yes,Sophomore
Lydon,Tyler,Nuggets,SF,04-09-96,82,84,225,Yes,Sophomore
Pasecniks,Anzejs,76ers,C,12-20-95,86,,229,No,
Swanigan,Caleb,Trail Blazers,PF,04-18-97,81,87,247,Yes,Sophomore
Kuzma,Kyle,Lakers,PF,07-24-95,81,84.25,221,Yes,Junior
Bradley,Tony,Jazz,C,01-08-98,82,89,248,Yes,Freshman
White,Derrick,Spurs,PG,07-02-94,77,79.5,200,Yes,Senior
Hart,Josh,Lakers,SG,03-06-95,78,80.25,204,Yes,Senior
Jackson,Frank,Pelicans,SG,05-04-98,76,79.5,208,Yes,Freshman
Reed,Davon,Suns,SG,06-11-95,78,84,208,Yes,Senior
Iwundu,Wesley,Magic,SG,12-20-94,79,85,205,Yes,Senior
Mason,Frank,Kings,PG,04-03-94,71,75.25,185,Yes,Senior
Rabb,Ivan,Grizzlies,C,02-04-97,82,85.5,215,Yes,Sophomore
Bolden,Jonah,76ers,PF,01-02-96,82,,227,No,
Ojeleye,Semi,Celtics,SF,12-05-94,79,81.75,235,Yes,Junior
Bell,Jordan,Warriors,PF,01-07-95,81,83.75,227,Yes,Junior
Evans,Juwan,Clippers,PG,07-26-96,73,77.5,177,Yes,Sophomore
Bacon,Dwayne,Hornets,SF,08-30-95,77,82,202,Yes,Sophomore
Dorsey,Tyler,Hawks,SG,02-14-96,76,77.25,180,Yes,Sophomore
Bryant,Thomas,Lakers,C,07-31-97,82,90,241,Yes,Sophomore
Hartenstein,Isaiah,Rockets,PF,05-05-98,84,86.25,225,No,
Dotson,Damyean,Knicks,SG,05-06-94,77,71,202,Yes,Senior
Brooks,Dillon,Grizzlies,SF,01-22-96,79,78,215,Yes,Junior
Brown,Sterling,Bucks,SG,02-10-95,78,81.5,230,Yes,Senior
Anigbogu,Ike,Pacers,C,10-22-98,82,90.25,230,Yes,Freshman
Thornwell,Sindarius,Clippers,SG,11-15-94,77,82,214,Yes,Senior
Cancar,Vlatko,Nuggets,PF,04-10-97,80,83,210,No,
Lessort,Mathias,76ers,PF,09-29-95,81,,250,No,
Morris,Monte,Nuggets,PG,06-27-95,75,76,175,Yes,Senior
Sumner,Edmond,Pacers,PG,12-31-95,77,81,170,Yes,Junior
Allen,Kadeem,Celtics,PG,01-15-93,75,81.25,200,Yes,Senior
Peters,Alec,Suns,PF,04-13-95,81,82.75,225,Yes,Senior
Williams-Goss,Nigel,Jazz,PG,09-16-94,76,79.25,182,Yes,Junior
Bird,Jabari,Celtics,SG,07-03-94,78,80,199,Yes,Senior
Vezenkov,Aleksandar,Nets,SF,08-06-95,81,,225,No,
Jaramaz,Ognjen,Knicks,PG,09-01-95,76,77.5,193,No,
Blossomgame,Jaron,Spurs,SF,09-16-93,79,82,214,Yes,Senior
Kaba,Alpha,Hawks,C,09-21-96,82,89.25,226,No,

Solutions

Expert Solution

Here i am using pare t test because sample size is small. In genaral case the difference between Z-test and t-test: Z- test is used when sample size is large (n>50), or the population variance is known. t-test is used when sample size is small (n<50) and population variance is unknown. Here i create new variables one is first 30 players all have the value of "First" and the second 30 players (observations 31 to 60) have the value of "second" of weight variable and take hypothesis testing for that i have each varible has 30 observation so i used t-test to perform a hypothesis test to determine if the mean weights are different for the first round selections and second round selection.

Below is the R output od the hypothesis testing problem  

H0: u1-u2=0

Vs, H1: u1-u2 != 0

`2017NHB` <- read.csv("C:/Users/Ashwini/Desktop/2017NHB.csv")
> View(`2017NHB`)
> head(`2017NHB`)
LastName FirstName Team Position Birthdate Height Wingspan Weight
1 Fultz Markelle 76ers PG 05-29-98 76 81.75 195
2 Ball Lonzo Lakers PG 10-27-97 78 79.00 190
3 Tatum Jayson Celtics SF 03-03-1998 80 83.00 204
4 Jackson Josh Suns SF 02-10-1997 80 81.75 203
5 Fox De'Aaron Kings PG 12-20-97 76 78.50 171
6 Isaac Jonathan Magic SF/PF 10-03-1997 83 85.25 205
> D=`2017NHB`
> attach(D)
The following objects are masked from D (pos = 3):

Birthdate, FirstName, Height, LastName, Position, Team, Weight,
Wingspan

> View(D)
> x=D$Weight
> View(x)
> x1=x[1:30]
> y=x[31:60]
> t.test(x1,y,var.equal = TRUE)

   Two Sample t-test

data: x1 and y
t = 0.47687, df = 58, p-value = 0.6352
alternative hypothesis: true difference in means is not equal to 0
95 percent confidence interval:
-8.207221 13.340554
sample estimates:
mean of x mean of y
212.4000 209.8333
Here we can see that P-value is 0.6352 is greater than 0.05 at 5%los so we accept the null hypothesis.

So i conclude that mean weights are same for the first round selections and second round selection.


Related Solutions

a file is comma delimited, what does this mean? Why is a delimiter helpful when reading...
a file is comma delimited, what does this mean? Why is a delimiter helpful when reading from a flat file of data?
Download the file data.csv (comma separated text file) and read the data into R using the...
Download the file data.csv (comma separated text file) and read the data into R using the function read.csv(). Your data set consists of 100 measurements in Celsius of body temperatures from women and men. Use the function t.test() to answer the following questions. Do not assume that the variances are equal. Denote the mean body temperature of females and males by μFμF and μMμMrespectively. (a) Find the p-value for the test H0:μF=μMH0:μF=μM versus HA:μF≠μM.HA:μF≠μM. Answer (b) Are the body temperatures...
The data set for this question set (Tab Q1 in the Excel data file) comes from...
The data set for this question set (Tab Q1 in the Excel data file) comes from a research project that tracks the elderly residents in a community to monitor their cognitive function and general health. Based on the literature, education is considered a protective factor against dementia, and memory decline is usually the first sign of dementia. So the researchers would like to know whether education level (measured in number of years of formal schooling) is correlated with memory function...
Data Set The data set (attached) is a modified CSV file on all International flight departing...
Data Set The data set (attached) is a modified CSV file on all International flight departing from US Airports between January and June 2019 reported by the US Department of Transportation (https://data.transportation.gov/Aviation/International_Report_Passengers/xgub-n9bw). Each record holds a route (origin to destination) operated by an airline. This CSV file was modified to keep it simple and relatively smaller. Here is a description of each column: Column 1 – Month (1 – January, 2 – February, 3 – March, 4 – April, 5...
1. Create one XML data file and one DTD file for the entire data set (using...
1. Create one XML data file and one DTD file for the entire data set (using a subset of SQL assignment – see below). [Use of ID and IDREF are not required.] 2. Write and execute XML statements for the following two queries: Q1. Find the name of an employee who lives in Lincoln and works in Omaha. Q2. Find salaries of employees who live in the same cities as the companies for which they work. [You can replace one...
Using Java create an application that will read a tab-delimited file that displays the MLB standings...
Using Java create an application that will read a tab-delimited file that displays the MLB standings Below: League AL East Tampa Bay 37 20 NY Yankees 32 24 Toronto 29 27 Baltimore 23 33 Boston 22 34 League AL Central Minnesota 35 22 Chi White Sox 34 23 Cleveland 33 24 Kansas City 23 33 Detroit 22 32 League AL West Oakland 34 21 Houston 28 28 LA Angels 26 31 Seattle 25 31 Texas 19 37 League NL East...
Write a C++ program to read a data file containing the velocity of cars crossing an...
Write a C++ program to read a data file containing the velocity of cars crossing an intersection. Then determine the average velocity and the standard deviation of this data set. Use the concept of vector array to store the data and perform the calculations. Include a function called “Standard” to perform the standard deviation calculations and then return the value to the main function for printing. Data to use. 10,15,20,25,30,35,40,45,50,55. Please use something basic.
Write a program in Java that reads a file containing data about the changing popularity of...
Write a program in Java that reads a file containing data about the changing popularity of various baby names over time and displays the data about a particular name. Each line of the file stores a name followed by integers representing the name’s popularity in each decade: 1900, 1910, 1920, and so on. The rankings range from 1 (most popular) to 1000 (least popular), or 0 for a name that was less popular than the 1000th name. A sample file...
Introduction This program will read from a file containing inventory data, and display summary information to...
Introduction This program will read from a file containing inventory data, and display summary information to the user. Instructions and Information For this project, input will be from file, and output will be to standard output (the console). The file will be read, and the information stored in the appropriate data format and data structure. Then, the inventory data will be printed out, listing the frequency of each item next to its name. The frequency means the combined sum of...
Below is a data set containing information on applicants applying for automobile insurance with an insurance...
Below is a data set containing information on applicants applying for automobile insurance with an insurance company. Here is a description of each variable: Conduct a test to see if the population average annual Claims Paid is higher for people who are Not Married thant it is for people who are Married. Use alpha = 0.05. State hypotheses. Explain your results. Assume that the population standard deviations are not equal. App. No. Marital Status Education Annual Salary Credit Score Age...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT