Create a custom chi-square function in matlab, MATLAB in Statistics

Assignment Help:

Introduction and Purpose

In the lectures and tutorials you have been introduced to a number of probability distributions. You have also learned that modelling any system (such as communication systems), requires the analysis of the input data to be fed to the model. Random variables play an important role in the development of a model, as they represent the input(s) to the modelled system. In order to use random variables in the modelling process, they need to be analysed and tested to verify that they represent a close fit to the real-world input. In order to do that, a 'Goodness of Fit' test is applied to a data sample in order to accept or reject a certain hypothesis. A hypothesis, generally states that a particular data sample conforms to a certain probability distribution.

The purpose of this assignment is to determine via statistical analysis the probability distributions of the numerical data contained in two *.csv (comma separated) files.

Scenario and advice

There are two data files, Data(a).csv and Data(b).csv. The files have been logged by a communications device and represent the input to a system. In order to determine the effects on the output of the system, we need to be able to determine their probability distributions. If you read the files in a text editor, it should be apparent that one maybe a continuous distribution and the other possibly a discrete distribution (however the type of distributions are unknown. To resolve this it is suggested that you carry out the following:

Minimum objectives

1. For both files, read them into MATLAB (one at a time) using the csvread('filename') function and save them to a vector.

2. Calculate the mean and standard deviation using either custom functions or the functions built into MATLAB.

3. Create a q-q plot of the data using the qqplot(x) function (this should help you to guess the data's distribution).

4. Guess a probability distribution (create a null hypothesis) and create a dataset with approximately the same number of elements as the data provided in the data files.

5. Create a custom Chi-Square function in MATLAB

6. Carry out a Chi-Square analysis of the data (reference tables are on chi-square-table.pdf)

7. Complete a regression analysis (if appropriate) and determine the equation of the line (please refer to lecture 4 for an example)

8. Report on all your findings.

Additional objectives

1. Using the results obtained above select a data distribution and sample it using the students t distribution (please refer to slide 21 in lecture 2)

2. Demonstrate graphically how, as the number of degrees of freedom increases, the student's t distribution approximates the normal distribution and plot the variance between the curves.

3. Verify your findings in 6 above using the Kolmogorov-Smirnov test (kstest(x)).

4. Report on all your findings.

Deliverables

The following must be submitted by the date outlined above:

An individual report (times new roman pt 12, single lined spaced) that outlines your solution and the development of your MATLAB simulation. It should include as a minimum an explanation of your MATLAB implementation, screen captures of the MATLAB plots, and also a summary of the input analysis including a plot of the quantile-quantile graph, a plot of the sample distribution and any functions you have developed in appendices. The report should approximate the following structure: Title page, Contents page, List of figures, Introduction, MATLAB Implementation, Input Analysis, Conclusions and Appendices (make sure all MATLAB code is clearly available in the appendices) 

Note about Plagiarism

§  Any sentences, including any definitions that are copied word for word are in quotation marks and cite the source(s);

§  Any figures copied include citations to sources;

§  Any code that is taken from any source (text book, WWW, journals etc) is fully acknowledged.


Related Discussions:- Create a custom chi-square function in matlab

Debugging techniques, Debugging Techniques: Any error in the computer ...

Debugging Techniques: Any error in the computer program is called a bug. This word is thought to date back to the 1940s, whenever a problem with an early computer was found to

If statement - matlab programming, The IF Statement: The if statement ...

The IF Statement: The if statement selects whether or not the other statement, or group of statements, is executed. The common form of the if statement is as shown below: i

Example of sorting strings, Example of sorting strings: To sort a cell...

Example of sorting strings: To sort a cell array of strings, also the sort function is used. The illustration is as follows, >> engcellnames = {'Chemical','Mechanical',.

Assignment , Determine sequence weights for the sequences ACTA, ACTT, CGTT,...

Determine sequence weights for the sequences ACTA, ACTT, CGTT, and AGAT in problem 1 by using Thompson, Higgins, and Gibson method a) compute pairwise distances between sequences

Example of functions which complete a task, Example of Functions which comp...

Example of Functions which complete a task: For illustration, the function below just prints the number arguments passed to it in a sentence format: As this function i

Advanced file input and output, Advanced File Input and Output: In tha...

Advanced File Input and Output: In that section, we saw how to read the values entered by user using the input as well as the output functions disp and fprintf, that shows inf

Index vector, Index vector: The index vector is then used as the indic...

Index vector: The index vector is then used as the indices for original vector. To get grades vector in ascending order, the indices used would be grades (2), grades (5), and

Curve fitting, Curve Fitting: The data is fundamentally either discret...

Curve Fitting: The data is fundamentally either discrete or continuous. In most of the applications, data is sampled, for illustration, The temperature recorded every ho

Mode, Mode The mode of a data set is the value which appears most often...

Mode The mode of a data set is the value which appears most often. The built-in function in a MATLAB for this is known as the mode. >> x = [9 10 10 9 8 7 3 10 9 8 5 10];

Graphics objects, Graphics objects: The objects involve graphics primit...

Graphics objects: The objects involve graphics primitives like lines and text, and also the axes used to orient the objects. These objects are organized hierarchically, and the

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd