- Joined
- 11/28/16
- Messages
- 1
- Points
- 11
1 You are given a list (n <= 100) of positive integers (value <= 500), your program divides these integers into two groups, such that the difference between the sums of these two groups is minimized. Here are some examples:
Example 1:
Input: 1 1 1 2 2
Output: (1 1 1)(2 2) => 1
(difference between 3 and 4)
2 In statistics, linear regression refers to an approach for modeling the relationship between a scalar response variable and one or more explanatory variables.
a) How would you construct a small data set (less than 50 data points) with 2 explanatory variables, such that both explanatory variables and the response variable are Gaussian, but the residual of the linear regression is not Gaussian?
b) How would you construct a small data set (less than 50 data points) with 2 explanatory variables, such that neither the explanatory variables nor the response variable is Gaussian, but the residual of the linear regression is Gaussian?
Example 1:
Input: 1 1 1 2 2
Output: (1 1 1)(2 2) => 1
(difference between 3 and 4)
2 In statistics, linear regression refers to an approach for modeling the relationship between a scalar response variable and one or more explanatory variables.
a) How would you construct a small data set (less than 50 data points) with 2 explanatory variables, such that both explanatory variables and the response variable are Gaussian, but the residual of the linear regression is not Gaussian?
b) How would you construct a small data set (less than 50 data points) with 2 explanatory variables, such that neither the explanatory variables nor the response variable is Gaussian, but the residual of the linear regression is Gaussian?