Answered step by step
Verified Expert Solution
Question
1 Approved Answer
please help with python hw problem calculating variance of data For our final few exercises we are interested in exploring the distribution of the data
please help with python hw problem calculating variance of data
For our final few exercises we are interested in exploring the distribution of the data as well as the relationships between two of our variables. To do this we need to introduce a few more statistical concepts including variance, standard deviation, covariance and correlation Variance looks at a single variable and measures how far the set of numbers are spread out from their average value. However its a bit hard to interpret because the units are squared so its not on the same scale as our original numbers. This is why most of the time we use the standard devation, which is just the square root of the variance. A large standard deviation tells us that our data is quite spread out while a small standard deviation tells us that most of our data is pretty close to the mean. (x - 2) variance = 4 stdev = variance Don't let the fancy math get you down the variance is just the sum of the squared values of each value minus the average for that value divided by the number of values. This is a little more complicated that what you have done before but you can definitely do this. Calculate the standard deviation of the loan_amount variable and store the variance in loan_var and the standard deviation in loan_stdev Save & Run Load History Show CodeLens Pair? 1. Your code here There are some great (more advanced) tools in Python for working with massive tables of data. In fact this table is a random sample of a data set from Kiva that contains 1.4 million rows! We will move on to more and bigger data sets in time, but for now we need a simple way to work with this sample. To do that we will represent each column of the table as its own list. To keep your coding easier and cleaner we will show you these lists here, but they will be automatically included for you in later activecodes. You can just use the list by name and it will be fine. Save & Run Load History Show CodeLens Pair? 1 loan_amount = [1250.0, 500.0, 1450.0, 200.0, 700.0, 100.0, 250.0, 225.0, 1200.0, 19 3 country_name = ('Azerbaijan', 'El Salvador', 'Bolivia', 'Paraguay', 'El Salvador, 5 time_to_raise = (193075.0, 1157108.0, 1552939.0, 244945.0, 238797.0, 1248909.0, 773 7 num_lenders_total = (38, 18, 51, 3, 21, 1, 10, 8, 42, 1, 18, 6, 28, 5, 16, 7, 54, 1 Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started