필터 지우기
필터 지우기

how to calculate the probability

조회 수: 51 (최근 30일)
ANKUR MAHESHWARI
ANKUR MAHESHWARI 2020년 6월 9일
답변: Chaman Dewangan 2021년 6월 20일
How to calulate Pr(PWF<Pschedule). Pr is the probability, PWF is an array of power (24x1) say , Pschedule is the scheduled power (1x1) and its expectation value (E(PWF<Pschedule(PWF))
  댓글 수: 1
David H
David H 2020년 6월 9일
I think you need lots more info in this question.
It looks like Pschedule is some function of PWF, but you haven't really said how. Is PWR a known array that you are inputting?
If you just want to know the probability an element of array "PWF" is smaller than the single number "Pschedule" you can do
mean(PWF<Pschedule)

댓글을 달려면 로그인하십시오.

답변 (1개)

Chaman Dewangan
Chaman Dewangan 2021년 6월 20일
If we have data then, the following MATLAB code can find probability.
%Create data
x=1.1:0.001:1.8;
x=x';% because fitdist function needs column vector
% Fit the probability distribution function.
% Here I have assumed normal distribution.
pd = fitdist(x,'Normal');
% mean and standard deviation are two parameters
mu1=pd.mu;
sigma1=pd.sigma;
% What is the probability? It is the area of probability density function
% for the given interval of random variable.
% Which we read as integration in mathematics.
% I want to find the probability for between 1.211 and 1.25
x2=[1.211:0.001:1.25];
y2 = pdf('Normal',x2,mu1,sigma1);
% trapz function is used to calculate the area for the given interval.
prob= trapz(x2, y2)

카테고리

Help CenterFile Exchange에서 Mathematics에 대해 자세히 알아보기

태그

제품


릴리스

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by