Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Hi, Struggling with code for the below pleases assist. Create a python file called theory.py. - You have learnt about when and how Logistic Regression

Hi,

Struggling with code for the below pleases assist.

Create a python file called theory.py.

- You have learnt about when and how Logistic Regression is applicable.

Using the problem description below, make use of the 4 applications of Logistic Regression to provide examples of how logistic regression is applicable for each application.

A data of students, 50 males and 50 females, containing 400 observations. There are 3 explanatory variables, namely; GRE, GPA and RANK. Treat the variables GRE and GPA as continuous and the RANK variable only takes values [1, 4]. Institutions with a rank of 1 have the highest prestige, while those with a rank of 4 have the lowest. First few rows for visualization: ## admit gre gpa rank ## 1 0 380 3.61 3 ## 2 1 660 3.67 3 ## 3 1 800 4.00 1 ## 4 1 640 3.19 4 ## 5 0 520 2.93 4 ## 6 1 760 3.00 2 These are the 4 applications: The aim is to model the probabilities of a response variable as a function of some explanatory variables. The aim is to perform descriptive discriminative analysis such as describing the difference between individuals in separate groups as a function of explanatory variables. The aim is to predict probabilities that individuals fall into two categories of the binary response as a function of some explanatory variables. The aim is to classify individuals into two categories based on explanatory variables. Answer to application 1: success of admission as a function of gender.

These are the only steps that were given to follow.

image text in transcribed

image text in transcribed

Compulsory Task Follow these steps: Create a python file called "theory py You have learnt about when and how Logistic Regression is applicable. Using the problem description below, make use of the 4 applications of Logistic Regression to provide examples of how logistic regression is applicable for each application A data of students, 50 males and 50 females, containing 400 observations. There are 3 explanatory variables, namely, GRE, GPA and RANK Treat the variables GRE and GPA as continuous and the RANK variable only takes values [1,4]. Institutions with a rank of 1 have the highest prestige, while those with a rank of 4 have the lowest. First few rows for visualization: ## admit gre gpa rank 1 3 3 1 ## 2 ## 3 ## 4 ## 5 ## 6 ~ 380 3.61 1 668 3.67 1 880 4. 1 640 3.19 520 2.93 1 760 3.00 2 These are the 4 applications The aim is to model the probabilities of a response variable as a function of some explanatory variables The aim is to perform descriptive discriminative analysis such as describing the difference between individuals in separate groups as a function of explanatory variables. The aim is to predict probabilities that individuals fall into two categories of the binary response as a function of some explanatory variables. The aim is to classify individuals into two categories based on explanatory variables. Answer to application 1: "success" of admission as a function of gender. Compulsory Task Follow these steps: Create a python file called "theory py You have learnt about when and how Logistic Regression is applicable. Using the problem description below, make use of the 4 applications of Logistic Regression to provide examples of how logistic regression is applicable for each application A data of students, 50 males and 50 females, containing 400 observations. There are 3 explanatory variables, namely, GRE, GPA and RANK Treat the variables GRE and GPA as continuous and the RANK variable only takes values [1,4]. Institutions with a rank of 1 have the highest prestige, while those with a rank of 4 have the lowest. First few rows for visualization: ## admit gre gpa rank 1 3 3 1 ## 2 ## 3 ## 4 ## 5 ## 6 ~ 380 3.61 1 668 3.67 1 880 4. 1 640 3.19 520 2.93 1 760 3.00 2 These are the 4 applications The aim is to model the probabilities of a response variable as a function of some explanatory variables The aim is to perform descriptive discriminative analysis such as describing the difference between individuals in separate groups as a function of explanatory variables. The aim is to predict probabilities that individuals fall into two categories of the binary response as a function of some explanatory variables. The aim is to classify individuals into two categories based on explanatory variables. Answer to application 1: "success" of admission as a function of gender

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Fundamentals Of Database Systems

Authors: Sham Navathe,Ramez Elmasri

5th Edition

B01FGJTE0Q, 978-0805317558

More Books

Students also viewed these Databases questions