Company: Schrodinger_30may
Difficulty: medium
A real estate agent is helping a seller set a price for their home by analyzing the sale prices of similar homes in the same area. The factors considered are the square footage and the sale price. The agent begins by eliminating any outliers from the list of comparable homes. To identify outliers: Select the home to test. Create a list of prices of other homes of the same size. It will be called compList in the examples. If there are no other homes of the same size, the house being tested is not an outlier. Otherwise: Calculate the mean price, P[m] , and the standard deviation, σ , for the homes compList . If |price[i] - P[m]| > 3 * σ , the house is an outlier. The valuation of the home is then calculated using the following rules: If there are no houses in the list, use 1000 per square foot as the price. If there is only one house in the list, its square foot price is used. If there are one or more houses in the list with the exact square footage of the house to price,