File:KS Example.png

From testwiki
Jump to navigation Jump to search
    Original file (580 × 478 pixels, file size: 11 KB, MIME type: image/png)

    This file is from Wikimedia Commons and may be used by other projects. The description on its file description page there is shown below.

    Summary

    Description
    English: Graph depicting an example of the Kolmogorov-Smirnov test. Matlab code shown below.
    Date
    Source Own work
    Author Bscan
    %Matlab code for Kolmogov-Smirnov visualization
    %Generate random samples
    NumSamps =30; mean = 0.5; sd = 1.1;
    samples = mean + sd*randn(NumSamps,1);
    
    %Get emprical cdf
    [f,x2] = ecdf(samples);
    
    %Get real cdf
    x_cdf = [-5:0.01:5];
    y_cdf = normcdf(x_cdf);
    
    figure; hold on;
    stairs(x2,f,'b-','LineWidth',2);
    plot(x_cdf,y_cdf,'-r','LineWidth',2);
    set(gca,'FontSize',12)
    grid on; box on;
    xlim([-4 4])
    

    Licensing

    I, the copyright holder of this work, hereby publish it under the following license:
    Creative Commons CC-Zero This file is made available under the Creative Commons CC0 1.0 Universal Public Domain Dedication.
    The person who associated a work with this deed has dedicated the work to the public domain by waiving all of their rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law. You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission.

    Captions

    Add a one-line explanation of what this file represents

    Items portrayed in this file

    depicts

    21 March 2013

    File history

    Click on a date/time to view the file as it appeared at that time.

    Date/TimeThumbnailDimensionsUserComment
    current20:42, 21 March 2013Thumbnail for version as of 20:42, 21 March 2013580 × 478 (11 KB)wikimediacommons>BscanUser created page with UploadWizard

    There are no pages that use this file.