I have maximum and minimum temperature data and I want to calculate probability of minimum temperature under the condition of maximum temperature. How can i do it in Matlab?
It is possible to perform it with Malab. I think that the problem is not the programming language but how you have formulated your conditional probability. Since a well-built formulation—mathematically—necessarily led to easy programming in any kind of language. Of course, I am not omitting the fact their implementation could also be problematic—learner should master his programming language.
Can you show us your mathematical formulation? I meant the equation that you used or want to translate into Malab language.
I am currently working on the application of statistics in Atmospheric Physics. I use the last edition of Wilk (2019)* that I am also advising for you. Especially the Chap. 2, where he dealt with the issue of conditional probability. He provides mathematical framework, which could be useful for you research—once you have understood his formations, translate them to Matlab language.
*Statistical Methods in the Atmospheric Sciences, Fourth Edition: https://www.sciencedirect.com/book/9780128158234/statistical-methods-in-the-atmospheric-sciences#book-description
Well, you need to clarify your question a little bit more, but the following is a necessity,
Depending on what sort of distribution you think governs your data, estimate the probability density function with "Maximum Likelihood Estimation". So now you would have P(Min_Temp) and P(Max_Temp),
Now back to your question: What do you mean by "Under the Condition of Maximum Temperature"?
Do you mean given the maximum temperature what is the probability of minimum temperature? if that's the case, it doesn't make sense! Usually, these two events are independent of each other,
However if you mean "given the conditions of maximum temperature", then what are those conditions?!
Please Clarify more then maybe we can help you further!
Initially, You need to define to function as min and max of temperature as A and B for instance, Next, it is possible to calculate the P(A|B) by the following code: