DBA

Dataset for Cochran-Mantel-Hanzel Test

Below is the script to create the table and dataset I used. This is just test data and not copied from anywhere. USE [yourdb] GO /****** Object: Table [dbo].[DrugResponse] Script Date: 6/12/2017 6:45:46 AM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIERl ON GO SET ANSI_PADDING ON GO CREATE TABLE [dbo].[DrugResponse]( [seqno] [int] IDENTITY(1,1) NOT NULL,… Continue reading Dataset for Cochran-Mantel-Hanzel Test

Statistics with R and SQL

Normal approximation to binomial distribution using T-SQL and R

In the previous post I demonstrated the use of binomial formula to calculate probabilities of events occurring in certain situations. In this post am going to explore the same situation with a bigger sample set. Let us assume, for example, that instead of 7 smokers we had 100 smokers. We want to know what are… Continue reading Normal approximation to binomial distribution using T-SQL and R