Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

guys please help asap In this problem we will draw from your probability plot understanding to create a function that for any dataset reports what

guys please help asap
image text in transcribed
In this problem we will draw from your probability plot understanding to create a function that for any dataset reports what is the closest distribution fit between: - Gaussian ( norn) - Exponential ( expon ) - Uniform ( uniform ) - Wald ( wa1d) Note: for this problem we will assume that the best fit distribution is that in which the sum of squared distances from the coordinates of the probplot to the identity line (X=Y) is minimized. In problem 2, you will be writing functions which assesses which distribution type best fits the input data and how well it fits. In the get_coordinates function, you will retrieve coordinates that are used in the calculate distance function to quantify how well the input data fits with a specified distribution type. Then, in the find_dist function, you will look through the calculated distances and determine which of the distribution types fits best and its corresponding distance value. To complete this problem, do the following steps. 1. Complete the get_coordinates function. This function takes in an array of data and the name of a distribution. It then calculates the QQ plot by calling the stats.probplot function with the dataset and the named distribution. The stats.probplot function returns a bizarre data structure: a tuple of two tuples; we're concerned with the two values of the first tuple. More concretely, the stats.probplot function retums something with a structure like ((x,y),(c,d)), you will need to return the elements in the position of x and from the eet_coordinates function (return it as a tuple like (x,v)). 2. Complete the calculate_distance() function. This function takes in two floats and retums the calculated distance. The formula you need to use for this function is (in LaTeX form): (x2x+y)2+(y2x+y)2

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

Students also viewed these Databases questions