Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Exoplanet mass data. For this exercise, we will perform multiple linear regression on some exoplanetary data to see if we can find a relationship that

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed
Exoplanet mass data. For this exercise, we will perform multiple linear regression on some exoplanetary data to see if we can find a relationship that can predict the mass of an exoplanet. Raw data Python: LogPlanetMass = np. array( [-0.31471074, 1.01160891, 0.58778666, 0.46373402, -@.01005034, 0.66577598, -1.30933332, -@.37106368, -0. 40047757, -0. 27443685, 1.30833282, -0. 46840491, -1.91054301, 0. 16551444, 0.78845736, -2.43041846, @. 21511138, 2.29253476, -2. 05330607, -0.43078292, -4.98204784, -0.48776035, -1.69298258, -0. 08664781, -2. 28278247, 3.30431931, -3.27016912, 1.14644962, -3.10109279, -0. 61248928]) LogPlanetRadius = np. array([ @. 32497786, @.34712953, @. 14842001, 0.45742485, 0.1889661 , 0. 06952606, 0.07696104, 0.3220835 , 0.42918163, -0.05762911, 0. 40546511, @. 19227189, -@.16251893, 0.45107562, 0.3825376 , -0. 82098055, 0.10436002, @.0295588 , -1.17921515, 0.55961579, -2.49253568, @.11243543, -@.72037861, 0.36464311, -0.46203546, @.13976194, -2.70306266, @.12221763, -2.41374014, 0.35627486]) LogPlanetorbit = np. array ([-2.63108916, -3.89026151, -3.13752628, -2.99633245, -3.12356565, 2.33924908, -2.8507665 , -3.04765735, -2. 84043939, -3. 19004544, -3.14655516, -3.13729584, -3.09887303, -3.09004295, -3.16296819, -2.3227878 , -3.77661837, -2.52572864, -4. 13641734, -3. 05018846, -2.40141145, -3.14795149, -@.40361682, -3. 2148838 , -2.74575207, -3.78014265, -1.98923527, , -3.35440922, -1.96897409, -2.99773428]) StarMetallicity = np. array([ 0.11 , -0.602, -0.4 , 0.01 , 0.15 , 0.22 , -0.01 , 0.02 , 0.06 , -0.127, 0.12 , 0.27 , 0.09 , -0.077, 0.3 9.14 , -0.07 , 0.19 , -0.02 , 0.12 , 0.251, 0.07 , 0.16 , 0.19 , 0.052, -0.32 , .258, 0.02 , -0.17 ]) LogStarMass = np. array([ 0. 27002714, 0.19144646, -0.16369609, 0. 44468582, 0. 19227189, 0. 01291623, 0.0861777 , @.1380213 , 0. 49469624, -0.43850496, 3.54232429, 0. 02469261, @.07325046, 0. 42133846, 0. 2592826 , -0.09431068, -0. 24846136, -0.12783337, -0. 07364654, 0. 26159474, 0.07603469, -0. 07796154, 0.09440868, 0. 07510747, 0.17395331, 0. 28893129, -0.21940057, 0. 02566775, -0. 09211529, 0. 16551444]) LogStarAge = np. array([ 1.58103844, 1.06471074, 2.39789527, 0.72754861, 8.55675456, 1.91692261, 1.64865863, 1.38629436, 8.77472717, 1.36097655 a. 1.80828877, 1.7837273 , @.64185389, 0. 69813472, 2.39789527, -0.35667494, 1.79175947, 1.90210753, 1.39624469, 1. 84054963, 2.19722458, 1.89761986, 1.84054963, 0. 74193734, 0.55961579, 1.79175947, @.91629073, 2.17475172, 1.36097655]) N = 30 HideChoice of variable transformation. All of these observed quantities have been transformed by taking the natural logarithm. When performing linear regression, it can help to have a general idea on how the predictors contribute to the predicted quantity. For example, if one were attempting to predict the sales of a store based on the population of surrounding region, then we might expect that the sales will be cumulative in the population variables. In this case, it would be best to leave these variables as they are, performing the linear regression directly on them. However, in astronomy and physics, it is very common for the predicted variable to be multiplicative in the predictors. For example, the power that a solar cell produces is the product of the amount of solar radiation and the efficiency of the cell. In that case, it is better to transform the variables by taking the logarithm as discussed previously. Variables LogPlanetMass is the logarithm of the observed exoplanet's mass in units of Jupiter's mass. A LogPlanetMass of zero is an exoplanet with the same mass as Jupiter. Jupiter is used as a convenient comparison, as large gas giants are the most easily detected, and thus most commonly observed, kind of exoplanet. LogPlanetRadius is the logarithm of the observed exoplanet's radius in units of Jupiter's radius, for much the same reason. LogPlanetorbit is the logarithm of the observed planet's semi-major axis of orbit, in units of AU. StarMetallicity is the relative amount of metals observed in the parent star. It is equal to the logarithm of the ratio of the observed abundance of metal to the observed abundance of metal in the Sun. The Sun is a quite average star, so it serves as a good reference point. The most common metal to measure is Iron, but astronomers define any element that isn't Hydrogen or Helium as a metal. Logstarmass is the logarithm of the parent star's mass in units of the Sun's mass. LogstarAge is the logarithm of the parent star's age in giga-years. Hide Exoplanet regression 1 point possible (graded) Let y be the vector of LogPlanetMass . Then place the remaining variables so that they form columns of X. You should also insert an additional column of ones to allow for an intercept, thus you will have six / parameters. The lay-out of X should be, left-to-right: intercept, LogPlanetRadius , LogPlanetOrbit , StarMetallicity , LogStarMass , LogStarAge . Find the estimate of 8 using multi linear least squares regression. What is / to three significant figures in each element? (You can enter the vector as a list of numbers, eg: [0.3, @.1, 1.4, 4.5, 2.4, 8.7] ) B = Submit You have used 0 of 2 attempts SaveLeast squares solution 2 points possible (graded) The multiple linear regression predictive model is thus: 9 (X) = XB. And the least squares optimization target is S( 8) - _ ( - y: (2,))2 = (y-9(X))(y -0(X)) = (y - XA) (y - XB) We can find the least squares solution by finding the gradient of S with respect to 8 and setting it to zero: VS(B) = as OB 0. What kind of object is VS? A real number A vector with the same size as B. A matrix of the same size as X- ) A vector with the same size as y- What is V (y - XB)? O (y - XB)T Oy. O - B. O - X.Least squares solution, continued 1 point possible (graded) The vector product rule is V(uv) = u VoteVu. Therefore, what is VS? O B X X 0 - 2y' X + 28T XT X. O - Xy + XXB - y'X + #XX. O y Xp. With some rearranging we get VS = 0, B = (XX) Xy. This is the least squares estimator, B. Note that to make matrix XT X invertible, we need X is full column rank. Submit You have used 0 of 2 attempts Save Exoplanet mass data. For this exercise, we will perform multiple linear regression on some exoplanetary data to see if we can find a relationship that can predict the mass of an exoplanet

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Negative Binomial Regression

Authors: Joseph M Hilbe

2nd Edition

1139005960, 9781139005968

More Books

Students also viewed these Mathematics questions

Question

Peoples understanding of what is being said

Answered: 1 week ago