1.In this project, we aim to detect and remove outliers from the dataset using various methods:
2.Mean Function: Outliers will be identified by comparing data points with the mean of the dataset.
3.Percentile Method: Outliers will be detected based on their position relative to the data distribution using percentiles.
4.Interquartile Range (IQR) Method: Outliers will be identified using the IQR, which is the range between the first and third quartiles of the data.
5.Normal Distribution: Outliers will be detected based on their deviation from the normal distribution assumption.
Z-score Method: Outliers will be identified by calculating the z-score of each data point and comparing it to a threshold.
Dataset used for outlier detection: Dataset
A child psychologist claims that the average time working mothers spend talking to their children is at least 11 minutes per day. We conduct a random sample of 1000 working mothers and find they spend an average of 11.5 minutes per day talking with their children.
Population Standard Deviation: 2.3 minutes
- Sample Size: 1000
- Sample Mean: 11.5 minutes
- Significance Level: α = 0.05 We perform a hypothesis test to determine if there is enough evidence to support the psychologist's claim.
A coffee shop claims that their average wait time for customers is less than 5 minutes. To test this claim, a sample of 40 customers is taken, and their wait times are recorded.
- Sample Size: 40
- Sample Mean Wait Time: 4.6 minutes
- Sample Standard Deviation: 0.8 minutes
- Significance Level: α = 0.05 We perform a hypothesis test to determine if there is enough evidence to support the coffee shop's claim.
Instructions for Running the Code Download the dataset from the provided link. Execute the code for outlier detection and removal using different methods. Perform hypothesis testing for both questions using the provided data and parameters. Analyze the results and determine the conclusions based on the hypothesis tests. Data Prep