# How to get mathematical model from a data set

13 views (last 30 days)

Show older comments

##### 0 Comments

### Answers (2)

Star Strider
on 8 Dec 2015

Not really. You have to have some idea of the relationships between the variables in order to hypothesise a mathematical model. Then you can use a number of statistical tools (for example the likelihood ratio) to compare different mathematical models to determine the one that best explains the data.

The first step regardless is to plot your data and see if any trends are evident. With three variables, you might want to plot ‘sold items’ (Z) as a function of ‘month’ (X) and ‘price’ (Y).

##### 0 Comments

Walter Roberson
on 8 Dec 2015

There are various routines in the Financial Toolbox; see http://www.mathworks.com/help/finance/functionlist.html but nothing springs to mind except maybe the SDE.

There are techniques that are used for timeseries in Neural Networks; see for example http://www.mathworks.com/help/nnet/ug/design-time-series-narx-feedback-neural-networks.html

But as for automatically determining the relationship between variables: No, you cannot do that. For any finite set of points, there is an infinite number of possible relationships that exactly match the data, let alone saying that there might be errors (or measurement limitations) in the original data that lead to many more possible relationships. There is no mathematical way to know that any one of those relationships is more correct than the others. You must therefore make use of any information you have about what would cause those variables to have a particular relationship to each other, and use that information in forming models and evaluating their effectiveness.

If there were tools that could automatically find the relationship between variables, then the tools would be able to explain why there is a correlation better than 0.99 between Margarine Consumption in Maine, and overall US Divorce Rates

### See Also

### Categories

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!