File:KS2 Example.png

Page contents not supported in other languages.
This is a file from the Wikimedia Commons
From Wikipedia, the free encyclopedia

KS2_Example.png(602 × 495 pixels, file size: 11 KB, MIME type: image/png)

Summary

Description
English: An example of the two-sample Kolmogorov-Smirnov test. Matlab code provided below.
Date
Source Own work
Author Bscan
%Matlab code for two-sample Kolmogorov-Smirnov visualization
%Generate random samples
NumSamps =50; 
mean1 = 0.5; sd1 = 1;
mean2 = 0.0; sd2 = 1.1;
samples1 = mean1 + sd1*randn(NumSamps,1);
samples2 = mean2 + sd2*randn(NumSamps,1);

%Get emprical cdfs
[f1,x1] = ecdf(samples1);
[f2,x2] = ecdf(samples2);

%Plot the two ecdfs
figure; hold on;
stairs(x1,f1,'b-','LineWidth',2);
stairs(x2,f2,'r-','LineWidth',2);
set(gca,'FontSize',12) %Increase font size
grid on; box on; %Add grid to figure
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:04, 21 March 2013Thumbnail for version as of 20:04, 21 March 2013602 × 495 (11 KB)BscanUser created page with UploadWizard
The following pages on the English Wikipedia use this file (pages on other projects are not listed):

Global file usage

The following other wikis use this file:

Metadata