import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
from sklearn.linear_model import LinearRegression
# read data to datsframe
data = pd.read_csv("alchol.csv")
# linear regression class instance
model = LinearRegression()
# fit the model training
model.fit(data[["fixed acid","volatie acid","citric acid","residual
sulfur","chlorides","free sulfur","total
sulfur","density","pH","sulphates"]],data.quality)
# coefficients of function
print(model.coef_)
# plotting the graphs with each variants to qulaity
plt.subplot(2,5,1)
plt.title("quality vs fixed acid")
plt.plot(data["fixed acid"],model.coef_[0]*data["fixed
acid"])
plt.subplot(2,5,2)
plt.title("quality vs volatie acid")
plt.plot(data["volatie acid"],model.coef_[1]*data["volatie
acid"])
plt.subplot(2,5,3)
plt.title("quality vs citric acid")
plt.plot(data["citric acid"],model.coef_[2]*data["citric
acid"])
plt.subplot(2,5,4)
plt.title("quality vs residual sulfur")
plt.plot(data["residual sulfur"],model.coef_[3]*data["residual
sulfur"])
plt.subplot(2,5,5)
plt.title("quality vs chlorides")
plt.plot(data["chlorides"],model.coef_[4]*data["chlorides"])
plt.subplot(2,5,6)
plt.title("quality vs free sulfur")
plt.plot(data["free sulfur"],model.coef_[5]*data["free
sulfur"])
plt.subplot(2,5,7)
plt.title("quality vs total sulfur")
plt.plot(data["total sulfur"],model.coef_[6]*data["total
sulfur"])
plt.subplot(2,5,8)
plt.title("quality vs density")
plt.plot(data["density"],model.coef_[7]*data["density"])
plt.subplot(2,5,9)
plt.title("quality vs pH")
plt.plot(data["pH"],model.coef_[8]*data["pH"])
plt.subplot(2,5,10)
plt.title("quality vs sulphates")
plt.plot(data["sulphates"],model.coef_[9]*data["sulphates"])
plt.show()
use the attached data set to plot graph using regression in python 4 1 fixed acid volatile ac citric acid residual s...
Use the sample data and confidence level given below to complete parts (a) through (d). A research institute poll asked respondents if they felt vulnerable to identity theft. In the poll, n=924 and x = 540 who said "yes." Use a 90% confidence level. E Click the icon to view a table of z scores. a) Find the best point estimate of the population proportion p (Round to three decimal places as needed.) b) Identify the value of the margin...
Suppose 1000 coins are tossed. Use the normal curve approximation to the binomial distribution to find the probability of getting the following result. Exactly 495 heads Use the table of areas under the standard normal curve given below. Click here to view page 1. Click here to view page 2. Click here to view page 3. Click here to view page 4. Click here to view page 5. Click here to view page 6. The probability of getting exactly 495...
Suppose 16 coins are tossed. Use the normal curve approximation to the binomial distribution to find the probability of getting the following result. More than 11 tails. Use the table of areas under the standard normal curve given below. Click here to view page 1. Click here to view page 2. Click here to view page 3. Click here to view page 4. Click here to view page 5. Click here to view page 6. Binomial probability = (Round to...