2nd-hw
.docx
keyboard_arrow_up
School
The City College of New York, CUNY *
*We aren’t endorsed by this school
Course
215
Subject
Statistics
Date
Feb 20, 2024
Type
docx
Pages
9
Uploaded by AgentRainWombat19
2nd hw
2024-01-10
R Markdown
1.
load your library/liobraries
library
(tidyverse)
## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
## ✔ dplyr 1.1.4 ✔ readr 2.1.4
## ✔ forcats 1.0.0 ✔ stringr 1.5.1
## ✔ ggplot2 3.4.4 ✔ tibble 3.2.1
## ✔ lubridate 1.9.3 ✔ tidyr 1.3.0
## ✔ purrr 1.0.2 ## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag() masks stats::lag()
## Use the conflicted package (<http://conflicted.r-lib.org/>) to ℹ
force all conflicts to become errors
2.load our data
penguins
<- read.csv
(
"https://raw.githubusercontent.com/zeigna/AppliedStatsAnalysi
s/master/penguins.csv"
)
3.
Verify the dataset loaded correctly by displaying the first 8 lines of code
head
(penguins, n =
8
)
## X species island bill_length_mm bill_depth_mm flipper_length_mm
## 1 1 Adelie Torgersen 39.1 18.7 181
## 2 2 Adelie Torgersen 39.5 17.4 186
## 3 3 Adelie Torgersen 40.3 18.0 195
## 4 4 Adelie Torgersen 36.7 19.3 193
## 5 5 Adelie Torgersen 39.3 20.6 190
## 6 6 Adelie Torgersen 38.9 17.8 181
## 7 7 Adelie Torgersen 39.2 19.6 195
## 8 8 Adelie Torgersen 41.1 17.6
182
## body_mass_g sex year
## 1 3750 male 2007
## 2 3800 female 2007
## 3 3250 female 2007
## 4 3450 female 2007
## 5 3650 male 2007
## 6 3625 female 2007
## 7 4675 male 2007
## 8 3200 female 2007
4.
Display the last 5 lines of penguins
tail
(penguins, n =
5
)
## X species island bill_length_mm bill_depth_mm flipper_length_mm
## 329 329 Chinstrap Dream 55.8 19.8 207
## 330 330 Chinstrap Dream 43.5 18.1 202
## 331 331 Chinstrap Dream 49.6 18.2 193
## 332 332 Chinstrap Dream 50.8 19.0 210
## 333 333 Chinstrap Dream 50.2 18.7 198
## body_mass_g sex year
## 329 4000 male 2009
## 330 3400 female 2009
## 331 3775 male 2009
## 332 4100 male 2009
## 333 3775 female 2009
5.
Examine the “structure” of the penguins dataset
str
(penguins)
## 'data.frame': 333 obs. of 9 variables:
## $ X : int 1 2 3 4 5 6 7 8 9 10 ...
## $ species : chr "Adelie" "Adelie" "Adelie" "Adelie" ...
## $ island : chr "Torgersen" "Torgersen" "Torgersen" "Torgersen" ...
## $ bill_length_mm : num 39.1 39.5 40.3 36.7 39.3 38.9 39.2 41.1 38.6 34.6 ...
## $ bill_depth_mm : num 18.7 17.4 18 19.3 20.6 17.8 19.6 17.6 21.2 21.1 ...
## $ flipper_length_mm: int 181 186 195 193 190 181 195 182 191 198 ...
## $ body_mass_g : int 3750 3800 3250 3450 3650 3625 4675 3200 3800 4400 ...
## $ sex : chr "male" "female" "female" "female" ...
## $ year : int 2007 2007 2007 2007 2007 2007 2007 2007 2007 2007 ...
glimpse
(penguins)
## Rows: 333
## Columns: 9
## $ X <int> 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 1…
## $ species <chr> "Adelie", "Adelie", "Adelie", "Adelie", "Adelie", "A…
## $ island <chr> "Torgersen", "Torgersen", "Torgersen", "Torgersen", …
## $ bill_length_mm <dbl> 39.1, 39.5, 40.3, 36.7, 39.3, 38.9, 39.2,
41.1, 38.6…
## $ bill_depth_mm <dbl> 18.7, 17.4, 18.0, 19.3, 20.6, 17.8, 19.6,
17.6, 21.2…
## $ flipper_length_mm <int> 181, 186, 195, 193, 190, 181, 195, 182, 191, 198, 18…
## $ body_mass_g <int> 3750, 3800, 3250, 3450, 3650, 3625, 4675,
3200, 3800…
## $ sex <chr> "male", "female", "female", "female", "male", "femal…
## $ year <int> 2007, 2007, 2007, 2007, 2007, 2007, 2007,
2007, 2007…
6.
Are there any extra columns? If so, remove it/them
penguins <-
subset
(penguins, select =
-
c
(
1
))
head
(penguins)
## species island bill_length_mm bill_depth_mm flipper_length_mm body_mass_g
## 1 Adelie Torgersen 39.1 18.7 181 3750
## 2 Adelie Torgersen 39.5 17.4 186 3800
## 3 Adelie Torgersen 40.3 18.0 195 3250
## 4 Adelie Torgersen 36.7 19.3 193 3450
## 5 Adelie Torgersen 39.3 20.6 190 3650
## 6 Adelie Torgersen 38.9 17.8 181 3625
## sex year
## 1 male 2007
## 2 female 2007
## 3 female 2007
## 4 female 2007
## 5 male 2007
## 6 female 2007
7.
What is the size of this dataframe
nrow
(penguins)
## [1] 333
ncol
(penguins)
## [1] 8
The penguins dataset has 333 rows by 9 columns
8.
What this the datatype of each variable in the penguins dataset
9.
How many unique values do we have in the variable year? Based on this, do you think year is quant or qual? Can year be a factor? ``
unique
(penguins
$
year)
## [1] 2007 2008 2009
Year has no mathematic qualities in this dataset, so recode year as a factor
10.
Based on your results for 7 and 8, recode the appropriate variables.
penguins
$
species
<-
as.factor
(penguins
$
species)
11.
Verify your recoding with str() or glimpse()
str
(penguins)
## 'data.frame': 333 obs. of 8 variables:
## $ species : Factor w/ 3 levels "Adelie","Chinstrap",..: 1
1 1 1 1 1 1 1 1 1 ...
## $ island : chr "Torgersen" "Torgersen" "Torgersen" "Torgersen" ...
## $ bill_length_mm : num 39.1 39.5 40.3 36.7 39.3 38.9 39.2 41.1 38.6 34.6 ...
## $ bill_depth_mm : num 18.7 17.4 18 19.3 20.6 17.8 19.6 17.6 21.2 21.1 ...
## $ flipper_length_mm: int 181 186 195 193 190 181 195 182 191 198 ...
## $ body_mass_g : int 3750 3800 3250 3450 3650 3625 4675 3200 3800 4400 ...
## $ sex : chr "male" "female" "female" "female" ...
## $ year : int 2007 2007 2007 2007 2007 2007 2007 2007 2007 2007 ...
12.
Run summary() on your dataset. Do any of the variables have missing values? If so, which variables?
summary
(penguins)
## species island bill_length_mm bill_depth_mm ## Adelie :146 Length:333 Min. :32.10 Min. :13.10 ## Chinstrap: 68 Class :character 1st Qu.:39.50 1st Qu.:15.60
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
Related Questions
1
-3.54490
%3D
-2
ulgn
İhi
arrow_forward
Chapter 2 project
arrow_forward
tab
(2.1-2.6) Target *
← → C
caps lock
YouTube
→1
esc
Home
Maps Kindle
Winter 2023
canvas.seattlecolleges.edu/courses/10176/assignments/81095
Syllabus
Announcements
Modules
Assignments
People
Office 365
Central Learning
Support
Central eTutoring
Zoom 1.3
!
1
X
Q
A
N
Course Hero
2
= Psychology 2e - O... StatCrunch (1.4-1.7) Writing...
W
S
X
Match each scatterplot shown below with one of the four specified correlations.
#
3
C
E
D
O
0 0
xb Answered: You randomly surve X
CO
4
C
R
8
LL
%
5
Search or type URL
V
T
a. -0.45
b. -0.91
c. 0.86
d. 0.35
G
6
MacBook Pro
OF
Y
H
New Tab
&
7
U
00 *
8
J
1
(
9
x +
K
0
0
L
P
arrow_forward
NVCC Fall 2021
1-
-2
-1
-1
Home
2.
4
-2
Announcements
-3.
4-
Syllabus
Modules
Discussions
Zoom
3-
2-
Grades
1-
-2
2 3
NOVA Policies
-1-
-2
Tutor.com: 24/7
Online Tutoring
-3
Library Resources
1+
a
P Type here to search
arrow_forward
sec 90
arrow_forward
O Horizon
AFinal Project- Website
E Isaiah Resto - Liberty Virtual Cou X
> Mr. T.
A assessment.fcps.edu/horizon/TestTaking/ViewAll
E Apps FCPS
FCPSnet
FCPS 24-7 Learning
FCPS Google Apps
E Isaiah Resto - Libert.
A Classes
O Isaia
HORIZON
Assessment System
Name: Isaiah Resto
Test: PreAlg Pythagorean Theorem Quiz 2021 (ID=820043)
Number of questions: 10
->
Save
Save & Exit
Show Status
Submit For Grading
Question 6 (ID=3309461)
Triangles ECF and ECD are right triangles. What is the length of x? Round to the tenths place.
3
O Mark Question For Review
P Type here to search
MREAX COUNTY PUBLIC SCHOOLE
00979 42719
近
arrow_forward
In a certain year, there were 88 female officials in Congress, which is comprised of the House of Representatives and the Senate. If there were 64 more female
members of the House of Representatives than female senators, find the number of females in each house of Congress.
There were female senators and
female members of the House of Representatives.
Submit Assignment
Continue
O 2021 McGraw Hill LLC. All Rights Reserved. Terms of Use Privacy Center Accessibility
&
%23
24
8.
9
R
Y
つ
arrow_forward
Maya Paniagua - L7.6 - HW.pdf x
Maya Paniagua-L7.6-Class N X
Meet-cws-wfk-dwy
mihq.com/web/viewer.html?state-%7Bids%3A%5Ble7Tbc-JIREGQE7)MKYF_PX_JPEYXOPBO%5D%2C'action 3A'open'%2C'userld
ia gua - Cl.
A Geometry 202.
Maya Paniagua - L7.6 - Class Notes.pdf
Saved Undo
OGina Wison (All Things Algebra.LLC), 2014-2018
TRIGONOMETRY Review!
Trigonometric Ratios: Find each trig ratio. Give your answer as a fraction in simplest form.
1. sin R =
2. sin T =
36
15
3. cos R =
4. cos T=
5. tan R =
6. tan T =
to the nearest tenth,
arrow_forward
dr
Vx2-4x-7
dy
yア-8y+5
arrow_forward
3.
13-2
arrow_forward
Can you please help with parts v & vi, thank you
arrow_forward
Evaluate the function for the given values of x.
-4x+6
for x<-1
h(x) =
2
x*+3
for -1
arrow_forward
It has been suggested that daily production of a subassembly would be increased if better lighting were installed and background music and free coffee and doughnuts were provided during the day. Management agreed to try the scheme for a limited time. A listing of the number of subassemblies produced per week before and after the new work environment for each employee follows.
Employee
Past Production Record
Production after Installing, Lighting, Music, etc.
JD
23
33
SB
26
26
MD
24
30
RCF
17
25
MF
20
19
UHH
24
22
IB
30
29
WWJ
21
25
OP
25
22
CD
21
23
PA
16
17
RRT
20
15
AT
17
9
QQ
23
30
FIND:
State the decision rule and show your work:
Reject H0 if T ≤ :
Compute T and arrive at a decision (Show your work).
T =
____________
,
do not reject
H0.
arrow_forward
It has been suggested that daily production of a subassembly would be increased if better lighting were installed and background music and free coffee and doughnuts were provided during the day. Management agreed to try the scheme for a limited time. A listing of the number of subassemblies produced per week before and after the new work environment for each employee follows.
Employee
Past Production Record
Production after Installing, Lighting, Music, etc.
JD
23
33
SB
26
26
MD
24
30
RCF
17
25
MF
20
19
UHH
24
22
IB
30
29
WWJ
21
25
OP
25
22
CD
21
23
PA
16
17
RRT
20
15
AT
17
9
QQ
23
Show your work, please. Thanks!
arrow_forward
1. Evalute
Vx² + 2
-00
arrow_forward
5)- tburlie633@myn x
Step Forward-NorQuest Colle x
Unit 1-Assignment #1 A.pdf
ent/1/Unit%201%20-%20Assignment%20%231%20%20A.pdf
Joseph Boyden | Th.
Brightburn (2019) F.
New Tab
New Tab
>>
/13
100%
High School Math Prep Foundations
Unit 1 Assignment
Carmen cut a 12 meter piece of cloth into three pieces. The first two pieces were each
3- meters long. What was the length of the other piece?
4.
arrow_forward
O 20970175
Bb Homework - 202010.119-
O Microsoft Word S20 HVM
O Microsoft Word - S20 HV
G authentication probabilit X +
File | C:/Users/ykt27/OneDrive/Desktop/IT102Chapter12Homework.pdf
E Apps
M Gmail
YouTube
Maps
( Select Term or Dat...
3 SQL Tutorial
Financial Aid
Scholarship Finder...
Bb Welcome, Yared -..
M Office 365 ProPlus...
work.
Given the following right triangle with x = 3,and y = 4, calculate r and then calculate each
of the six trig functions for 0. Show your work to get any credit at all for this problem.
Round answers to 2 decimal places.
1.
a. r=
b. sin (0) =
cos (0)=
d. tan (0) =
%3D
C.
е. CSc (Ө) -
f. sec (Ө)
g. cot (0) =
%3D
1:56 PM
3/2/2020
arrow_forward
Problem 6-29 (Algorithmic)
The north-south highway system passing through Albany, New York, can accommodate the capacities shown. If the constant is "1" it must be entered in the box. If your
answer is zero enter "0". For negative values enter "minus" sign (-).
6
Flow capacity:
10,000vehicles
10
per hour
3
3
Entering
Albany
(north)
Leaving
Albany
(south)
4
Маx
X61
s.t.
2.
arrow_forward
5
ysinz dady.d.z.
2.
arrow_forward
13. A certain type of glass is such that a slab 1" thick absorbs one-quarter of the light which starts to pass through it. How thin must a pane of be made to absorb only 1% of the light.
arrow_forward
SEE MORE QUESTIONS
Recommended textbooks for you
MATLAB: An Introduction with Applications
Statistics
ISBN:9781119256830
Author:Amos Gilat
Publisher:John Wiley & Sons Inc
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
ISBN:9781305504912
Author:Frederick J Gravetter, Larry B. Wallnau
Publisher:Cengage Learning
Elementary Statistics: Picturing the World (7th E...
Statistics
ISBN:9780134683416
Author:Ron Larson, Betsy Farber
Publisher:PEARSON
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
Statistics
ISBN:9781319013387
Author:David S. Moore, George P. McCabe, Bruce A. Craig
Publisher:W. H. Freeman
Related Questions
- 1 -3.54490 %3D -2 ulgn İhiarrow_forwardChapter 2 projectarrow_forwardtab (2.1-2.6) Target * ← → C caps lock YouTube →1 esc Home Maps Kindle Winter 2023 canvas.seattlecolleges.edu/courses/10176/assignments/81095 Syllabus Announcements Modules Assignments People Office 365 Central Learning Support Central eTutoring Zoom 1.3 ! 1 X Q A N Course Hero 2 = Psychology 2e - O... StatCrunch (1.4-1.7) Writing... W S X Match each scatterplot shown below with one of the four specified correlations. # 3 C E D O 0 0 xb Answered: You randomly surve X CO 4 C R 8 LL % 5 Search or type URL V T a. -0.45 b. -0.91 c. 0.86 d. 0.35 G 6 MacBook Pro OF Y H New Tab & 7 U 00 * 8 J 1 ( 9 x + K 0 0 L Parrow_forward
- NVCC Fall 2021 1- -2 -1 -1 Home 2. 4 -2 Announcements -3. 4- Syllabus Modules Discussions Zoom 3- 2- Grades 1- -2 2 3 NOVA Policies -1- -2 Tutor.com: 24/7 Online Tutoring -3 Library Resources 1+ a P Type here to searcharrow_forwardsec 90arrow_forwardO Horizon AFinal Project- Website E Isaiah Resto - Liberty Virtual Cou X > Mr. T. A assessment.fcps.edu/horizon/TestTaking/ViewAll E Apps FCPS FCPSnet FCPS 24-7 Learning FCPS Google Apps E Isaiah Resto - Libert. A Classes O Isaia HORIZON Assessment System Name: Isaiah Resto Test: PreAlg Pythagorean Theorem Quiz 2021 (ID=820043) Number of questions: 10 -> Save Save & Exit Show Status Submit For Grading Question 6 (ID=3309461) Triangles ECF and ECD are right triangles. What is the length of x? Round to the tenths place. 3 O Mark Question For Review P Type here to search MREAX COUNTY PUBLIC SCHOOLE 00979 42719 近arrow_forward
- In a certain year, there were 88 female officials in Congress, which is comprised of the House of Representatives and the Senate. If there were 64 more female members of the House of Representatives than female senators, find the number of females in each house of Congress. There were female senators and female members of the House of Representatives. Submit Assignment Continue O 2021 McGraw Hill LLC. All Rights Reserved. Terms of Use Privacy Center Accessibility & %23 24 8. 9 R Y つarrow_forwardMaya Paniagua - L7.6 - HW.pdf x Maya Paniagua-L7.6-Class N X Meet-cws-wfk-dwy mihq.com/web/viewer.html?state-%7Bids%3A%5Ble7Tbc-JIREGQE7)MKYF_PX_JPEYXOPBO%5D%2C'action 3A'open'%2C'userld ia gua - Cl. A Geometry 202. Maya Paniagua - L7.6 - Class Notes.pdf Saved Undo OGina Wison (All Things Algebra.LLC), 2014-2018 TRIGONOMETRY Review! Trigonometric Ratios: Find each trig ratio. Give your answer as a fraction in simplest form. 1. sin R = 2. sin T = 36 15 3. cos R = 4. cos T= 5. tan R = 6. tan T = to the nearest tenth,arrow_forwarddr Vx2-4x-7 dy yア-8y+5arrow_forward
Recommended textbooks for you
- MATLAB: An Introduction with ApplicationsStatisticsISBN:9781119256830Author:Amos GilatPublisher:John Wiley & Sons IncProbability and Statistics for Engineering and th...StatisticsISBN:9781305251809Author:Jay L. DevorePublisher:Cengage LearningStatistics for The Behavioral Sciences (MindTap C...StatisticsISBN:9781305504912Author:Frederick J Gravetter, Larry B. WallnauPublisher:Cengage Learning
- Elementary Statistics: Picturing the World (7th E...StatisticsISBN:9780134683416Author:Ron Larson, Betsy FarberPublisher:PEARSONThe Basic Practice of StatisticsStatisticsISBN:9781319042578Author:David S. Moore, William I. Notz, Michael A. FlignerPublisher:W. H. FreemanIntroduction to the Practice of StatisticsStatisticsISBN:9781319013387Author:David S. Moore, George P. McCabe, Bruce A. CraigPublisher:W. H. Freeman
MATLAB: An Introduction with Applications
Statistics
ISBN:9781119256830
Author:Amos Gilat
Publisher:John Wiley & Sons Inc
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
ISBN:9781305504912
Author:Frederick J Gravetter, Larry B. Wallnau
Publisher:Cengage Learning
Elementary Statistics: Picturing the World (7th E...
Statistics
ISBN:9780134683416
Author:Ron Larson, Betsy Farber
Publisher:PEARSON
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
Statistics
ISBN:9781319013387
Author:David S. Moore, George P. McCabe, Bruce A. Craig
Publisher:W. H. Freeman