Quiz L03 Submit - HW3
pdf
keyboard_arrow_up
School
Pennsylvania State University *
*We aren’t endorsed by this school
Course
365
Subject
Industrial Engineering
Date
Feb 20, 2024
Type
Pages
5
Uploaded by Jordanmchampion
L03: Submit - HW3 Started: Feb 3 at 10:14pm
Quiz Instructions
Please be sure to read L03 before attempting this assignment.
The widely used Statlog German credit dataset (
click here
(
https://psu.instructure.com/courses/2313011/files/158251342?wrap=1
) (https://psu.instructure.com/courses/2313011/files/158251342
/download?download_frd=1) ), named 'South German Credit' data, contains some
important features (i.e., variables) related to a debtor, which can be used to predict
if there is a credit risk once the debtor has applied for loans from the bank. ID#
: Users’ ID
duration: Credit duration in months (in the range of 0 and 1200)
purpose
: Purpose for which the credit is needed (Ten levels: furniture, car(used), car(new), retraining, repairs, domestic appliances, business, television,
vacation, others)
employment_duration:
Duration of debtor's employment with the current
employer (Five levels: unemployed, less than 1 year, 1-4 years, 4-7 years, more
than 7 yrs)
age:
Age expressed in years (in the range of 18-75)
housing:
Type of housing the debtor lives in (Three levels: rent, own, for free)
foreign_worker:
Is the debtor a foreign worker? (Two levels: Yes, No)
number_credits:
Number of credits including the current one the debtor has (or
had) at this bank (Four levels: 1, 2-3, 4-5, equal or more than 6)
credit_history
: The credit history of the debtor (Five Levels)
• 0 : delay in paying off in the past
• 1 : critical account/other credits elsewhere
• 2 : no credits taken/all credits paid back duly
• 3 : existing credits paid back duly till now
Quiz: L03: Submit - HW3
https://psu.instructure.com/courses/2313011/quizzes/4976390/take
1 of 5
2/3/2024, 10:24 PM
• 4 : all credits at this bank paid back duly
amount:
Amount requested by the debtor (in the range of 1K and MAX)
installment_rate
: Credit installments as a percentage of debtor's disposable
income (Four levels):
• 1 : >= 35
• 2 : 25 <= … < 35
• 3 : 20 <= … < 25
• 4 : < 20
credit_risk
: Credit risk assessed as the potential that a borrower fails to meet its
obligations (Two levels: good, bad)
2 pts
Question 1
Use the appropriate function to read the data into R as a data frame
named hw3.data
. Complete the blanks below with the missing syntax you would
use to complete this import. Please assume that you've already set your working
directory to the folder containing the file.
<- (
, header =
)
6 pts
Question 2
Use R to calculate a new variable (called
z_sc
) based on the existing variable
"amount". This variable should represent the z-scores for each observation of
Quiz: L03: Submit - HW3
https://psu.instructure.com/courses/2313011/quizzes/4976390/take
2 of 5
2/3/2024, 10:24 PM
"amount". You should therefore have a whole new column in your data set that has
1000 different values. When calculating the z-scores in R, be sure to use the
z-score formula from Lesson L02, a mean value of 3271.248, and a standard
deviation of 2822.752
Complete the blanks below with the missing syntax you would use to complete
this task in R.
$
= (
$
-
) / Click your data frame in the Global Environment to view it. This will open in a
separate tab in RStudio.
Click the arrows next to the variable name "z_sc" to sort the values (either in
descending or ascending order), then use this information to answer the following
questions.
2 pts
Question 3
What is the highest z-score in your distribution?
2 pts
Question 4
Quiz: L03: Submit - HW3
https://psu.instructure.com/courses/2313011/quizzes/4976390/take
3 of 5
2/3/2024, 10:24 PM
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
Provide the value of "amount" that this z-score corresponds to
2 pts
Question 5
Is this z-score significantly HIGHER than you would expect based on chance?
YES
NO
2 pts
Question 6
What is the lowest z-score in your distribution?
2 pts
Question 7
Provide the value of "amount" that this z-score corresponds to
Quiz: L03: Submit - HW3
https://psu.instructure.com/courses/2313011/quizzes/4976390/take
4 of 5
2/3/2024, 10:24 PM
Quiz saved at 10:24pm
2 pts
Question 8
Is this z-score significantly LOWER than you would expect based on chance?
YES
NO
Submit Quiz
Quiz: L03: Submit - HW3
https://psu.instructure.com/courses/2313011/quizzes/4976390/take
5 of 5
2/3/2024, 10:24 PM