Project 2
all the questions can be done in Python and R. but got no information. therefore I have to write it in the box;
-
Display the data of white wine and red wine:
- Display the rows and columns of the "winequality-white" and "winequality-red" datasets.
-
Get the size of both white wine and red wine:
- Count the number of rows and columns in each dataset.
-
Get the number of null in both types of wines:
- Check if there are any missing values (null) in each dataset and count them.
-
Check for duplicates and remove them in both types of wine data:
- Identify if there are any duplicate rows in each dataset and remove them.
-
Get the number of unique values in all Features and print them:
- Count the unique values in each column (feature) of both datasets.
-
Print the mean density of both the sets:
- Calculate the average density for the "winequality-white" and "winequality-red" datasets.
-
Combine both datasets with the color of the wine in a column:
- Add a new column called "wine_type" to each dataset with values "white" and "red" respectively.
-
Remove the null values if any:
- Remove any rows that have missing values in either dataset.
-
Remove the outliers if any:
- Identify and remove any extreme values that deviate significantly from the rest of the data in each dataset.
-
Do wines with higher alcohol content receive better ratings?
- Analyze the relationship between alcohol content and quality ratings to determine if higher alcohol content correlates with higher ratings.
-
Find correlation between citric acid content and pH:
- Calculate the correlation coefficient between citric acid content and pH values.
-
Find regression of pH on citric acid:
- Perform a regression analysis to predict pH based on citric acid content.
-
Find how many variables are independent:
- Determine the number of independent variables (features) in each dataset.
-
Create a new column as the acidity level:
- Divide the data into five groups based on acidity levels, categorized as "High," "Moderately High," "Medium," and "Low" using pH values.
-
Find the mean quality of each acidity level with groupby:
- Calculate the average quality rating for each acidity level using the "groupby" function.
-
Is a certain type of wine (red or white) associated with higher quality?
- Compare the average quality rating for red and white wines to identify if one type tends to have higher quality.
-
Select samples with alcohol content less than the median:
- Filter and extract samples with alcohol content lower than the median value.
-
Get the quality rating for the low alcohol and high alcohol groups:
- Calculate the average quality rating for samples with low and high alcohol content.
-
Do sweeter wines get more ratings?
- Analyze if wines with higher residual sugar content tend to receive better ratings.
-
Get the number of counts based on ratings and color of wine:
- Count the occurrences of each rating for red and white wines.
-
Is the density of red wine and white wine similar?
- Compare the density distribution of red and white wines to determine similarity.
-
Is the confidence interval for the differences of the proportion of white wine with rating 3 and the proportion of red wine with rating 3?
- Calculate the confidence interval for the difference in proportions of white and red wines with rating 3.