# Hazen - discretization for CDF p pmin=1/pmax...

This preview shows page 1. Sign up to view the full content.

% % In Lecture 4, we will briefly discuss the Hazen's formula F_i=(i-a)/(n-2*a+1) % as a correct way of plotting the data. The code below establishes that median rank % formula for cumulative distribution is % F_i=(i-0.3)/(n-0.6+1) with a=0.3. % % Purpose: To show that 'typical' CDF formula of F_i=i/N can get us into % trouble. % % Written by M. A. Alam for EE650R Reliability Physics Class (Sept. 14, 2006) % clear all; c n=50 % nos of experimental datapoints pmax=5*n
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: % discretization for CDF p pmin=1/pmax p=linspace(pmin,1,pmax); dp=p(2)-p(1); d for i=1:1:n pf=i*factorial(n)/(factorial(i)*factorial(n-i)) pp=0.0; m=0; while pp < 0.5 % Median rank-order=0.5, other values for other measures m=m+1; pm=p(m); pp=pp+ (pf*(pm^(i-1)*(1-pm)^(n-i)*dp)); end fsum(i)=p(m) end e xx=linspace(1,n,n); aa=0.3; % In principle, one should try various values of aa. ptheory=(xx-aa)/(n-(2*aa)+1); p plot(xx,fsum,'go',xx,ptheory,'b+')...
View Full Document

## This note was uploaded on 02/19/2012 for the course ECE 695a taught by Professor Staff during the Spring '08 term at Purdue.

Ask a homework question - tutors are online