Statistical Methods and Computer Applications 9421053747, 9789350243664, 9350243660

SECTION A: BIO-STATISTICS 1 Significant Digits and Rounding of Numbers 2 Classification of Data 3 Diagrammatic Represent

126 14 40MB

English Pages 151 [348]

Report DMCA / Copyright

DOWNLOAD PDF FILE

Table of contents :
COVER
CONTENTS
Section A : BIOSTATISTICS
Significant Digits and Rounding of Numbers
Classification of Data
Diagrammatic Representation of Data
Measures of Standard Deviation
Sampling and Estimation
Probability lntroducing Computer Systems and Baye's Theorem
Probability Distributions [BINOMIAL, POISSON AND NORMAL DISTRIBUTIONS]
Skewness and Kurtosis
Correlation Analysis
Regression Analysis
Tests of Significance - Parametric Tests
Chi-Square Test - A Non-Parametric Test
F-Distribution and ANOVA Table
Design of Experiments
Statistical Quality Control Charts
Section B : COMPUTER APPLICATIONS
Introducing Computer Systems
Algorithms and Flow Charts
Introduction to C
Constants, Variables and Data Types
Operators and Expressions
Decision Control Structure
Loop Control Structure
Functions
Arrays
File Handling
Computer Applications in Pharmaceutical and Clinical Studies
Recommend Papers

Statistical Methods and Computer Applications
 9421053747, 9789350243664, 9350243660

  • 0 0 0
  • Like this paper and download? You can publish your own PDF file online for free in a few minutes! Sign Up
File loading please wait...
Citation preview

Statistical Methods and Computer Applications P.N.ARORA M.A. Ph,D"

Delhi University. Reader, Dayal Singh Col/ege, University of Delhi New Delhi

N. GURUIJRASAD Assistant Professor

Department of Computer Science PES Institute of Technology '. Bangalore

lUI GBimalaya GpublishingCiJlouse GJJvt.Gf td. MUMBAI- DELHI- NAG'PUR • BAN GALORE • HYDERABAD • CHENNAI· PUNE· LUCKNOW

ii (CJ

AUTHOR

No part of this publication may bo stored in a retrieval system, or transmitted in any form or by any means electronic , mechanical , photocopying, recording/or otherwise without the prior written permission of the publisher.

ISBN First Edition

Published by

Branch Offices belhi

:978-93-5024-366-4 2009

Mrs. Meena Pandey for HIMALAYA PUBLISHING HOUSE, "Ramdoot", Dr. Bhalerao Marg, Girgaon, Mumbai-400 004. Phones: 2386 01 70/2386 38 63 Fax: 022 - 2387 71 78 E-Mail: [email protected] Website: www.himpub.com "Pooja Apartments", 4-B, Murari Lal Street, Ansari Road , Darya Ganj, New Delhi-11 0 002. Phone : 2327 03 92 , Fax: 2324 30 30 Fax: 011 - 232562 86

Nagpur

Kundanlal Chandak Industrial Estate, Ghat Road, Nagpur-440 018. Phones: 2738731 , 3296733, Telefax: 0712-272 12 15

Bangalore

NO.16/1, (Old 12/1), 1st Floor, Next to Hotel Highlands, Madhava Nagar, RaceCourse Road , Bangalore - 560 001 Phone: 2228 15 41, 2238 54 61 Telefax :080-2228 66 11

Hyderabad

No.2-2-1167/2 H, 1sl Floor, Near Railway Bridge, Tilak Nagar, Main Road, Hyderabad - 500 044. Phone : 65550 17 45, Fax: 040-2756 00 41

Chennai

No.2 , Ramakrishna Street, North Usman Rd ., T.Nagar, Chennai-600 017. Phones: 044-28144004, 28144005

Pune

No. 11 , 3rd Floor, Wing-A , Sahadeo Avenue-II, S.No. 5/9 + 5/10, Someshwarwada, Ba.ner Road, Pune - 411 008. Mobile: 9421053747

Lucknow

C-43 , Sector-C , Ali Gunj, Lucknow - 226 024. Phone: 0522 - 4047594

OTP

Rachi Enterprises, Bangalore

Printed by

Geetanjali Press Pvt. Ltd. Kundanlal Chandak Industrial Estate, Ghat Road , Nagpur - 18

CONTENTS SECTION· A: BIO·STATISTICS Significant Digits and Rounding of Numbers ...... ... ..... ........... ... ... ........... ... ....... 2 2

Classification of Data .. ... .... ..... .. ...... ......... ............ ... .... ............. .......... ... ..... ..... .. . 6

3

Diagrammatic Representation of Data .. ........ ........ ... .. ......... .. ....... ..... ...... .... .... 17

4

Measures of Standard Deviation ....................................... ... ...... .......... ........... 28

5

Sampling and Estimation .. .................... .. .... .. .. ................................... .. ..... ...... . 39

6

Probabilitylntroducing Computer Systems and Baye's Theorem ..... .. .. ......... 56

7

Probability Distributions [BINOMIAL , POISSON AND NORMAL DISTRIBUTIONS) ........ ... .................. ... .. ... :............. ..... .. .'76

8

Skewness and Kurtosis .... ........................ ...... ....................... ...... .................... 97

9

Correlation Analysis ......... .... ............... .. ..... ... .. .. ............................................. 107

10

Regression Analysis .. ..... .... .... ... ................ ... ........... ... ... ... ..................... ....... . 116

11

Tests of Significance - Parametric Tests .... ............. ..................................... 125

12

Chi-Square Test - A Non-Parametric Test ....... .. .... ... ....... ....... ...... .............. 151

13

F-Distribution and ANOVA Table ..... ....... ...... ... ......... ... .......... ..... ...... ........ ... .. 160

14

Design of Experiments ... ... .................. .... ....... .. ...... ... ........... ........... .............. 176

15

Statistical Ouality Control Charts .............. .... .... ................. .. ... .. ..................... 179

SECTION· B: COMPUTER APPLICATIONS Introducing Computer Systems ... ............. ... ... ....... .... ...... .. ....... ............ ............ . 2 2

Algorithms and Flow Charts ........ .. .. ... ... ...... .... ... ............. .. ..... ......................... 22

3

Introduction to C .. .................. ........... ........... ........ .... .... ............ :... .. ..... ....... ..... .. 32

4

Constants, Variables and Data Types .... ... ..... ..... ... ......... ... ........ .. ................ ... 39

5

Operators and Expressions ... ... ....... : ..... ... ........... .... .. ...... .................. .......... .. .. 51

6

Decision Control Structure :.................. ............... .... ...... ............ .. ..................... 66

7

Loop Control Structure ... ................ ..... ... ... ... .... ..... ....... ....... ..... ........ .... ..... .... ... 81

8

Functions ... .... .. ... ... ...... ....... ........... ............. ..... ....... ............. ... ...................... .... 93

9

Arrays ....... ... ............. .. ........................................................ ...... ..... ... ....... ....... 110

10

File Handling .... .... .. .... .... ,.... ... ... .. .. ... .. .. ..... .... ......... .. ... ..... ............. ...... ...... ..... 128

11

Computer Applications in Pharmaceutical and Clinical Studies .................. 145

,



"This page is Intentionally Left Blank"

,

• •

"



Section A

BIOSTATISTICS FOR B.PHARMACY

"This page is Intentionally Left Blank"

Significant Digits and Rounding of Numbers 1.1

EXACT AND APPROXIMATE NUMBERS Exact Numbers: All natural numbers, rational numbers and real numbers are exact numbers . For

example, 1, 2, 3, 4, ... ,

2 "7'

5

10 , ... , etc. are exact numbers .

. Approximate Numbers: Approximate numbers are those numbers which represent the number

certain degree

0/ accuracy.

For example, n, e, .fi, fj,

15, ~,~

/0

a

are approximate numbers . The

approximate value of 1t is 3.1416 or if we wish a better approximation we can take Ilowever, we cannot write its exact value.

1t .=

3.14159265.

1.2

SIGNIFICANT DIGITS Significant Digits or Significant Figures: The digits which are used to express a number are called significant digits or significant figures. Illustration 1. S.No.

Number

Significant digits

S.No.

Number

Significant digits

1. 2.

0.88876 3. 1416 3.0529

8,8,8,7,6 3, 1, 4, t, 6 3,0,5,2,9

4. 5. 6.

0.00053 7.00 73459

5,3 7,0,0 7,3,4,5,9

3.

1.3 RULES TO DETERMINE THE SIGNIFICANT DIGITS The significant digits in a number are determined by the following rules: 1. All the non-zero digits in a number are significant digits. For example, 3.1416, 73.459, 0.88876 etc. 2. All zeros between two non-zero digits are significant digits. For example, 3.05929 has 3, 0,5,2,9 five significant digits, whereas 3.005029 has 3,00,5,0,2, 9 has seven significant digits. 3. If (I number having embedded decimal point ends with a non-zero or a sequence of zeros, then all these zeros are significant. For example, the number 0.7365 has 7, 3 ,6, 5 (four) significant digits whereas the number 7.00 has 7, 0, 0 (three) significant digits.

4. All zeros preceding a non-zero digit are non-significant. For example, 0.00073 has only 7, 3 as significant digits. It is important to note that in the number 0.00073, the zeros 0, 0, 0 are non-significant. Example 1. Find the significant digits in the number 0.02144. Solution. Here, 2, 1, 4, 4 are four significant digits. Example 2. Find the number o/significant digits in the number 28.51000. Solution. There are seven significant digits. The significant digits are: 2, 8, 5, 1, 0, 0, O. 3

4

Biostatistics

1.4 ROUNDING OFF OF NUMBERS Often we come·across numbers with a large number .of digits and it becomes necessary to cut short them to a usable number of digits. This process of cutting off superfluous digits and retaining tile nearest integer representation is called rounding off.

1.5

RULES FOR ROUNDING OFF If a number is to be rounded off to n significant digits, we follow the following rules: I. Discard all the digits to the right of nth digit. 2. If (n + 1)th digit is greater than 5 or it is 5 followed by non-zero digit, then the nth digit is increased by I. If the (n + I)th digits is less than 5, then the nth digit remains unchanged. For example, the number 1.73741 is rounded off to four significant digits as 1.738, whereas the number I. 73341 is rounded off to four significant digits as 1.733. 3. If the (n + l)th digit is 5 and is followed by zero or zeros then the digit is increased by l. If the nth digit is odd and it remains unchanged if it is even. Illustrations 2. ({I) The numbers 3.14350 is rounded off to four significant digits as 3.144. Here the fifth digit is 5 (and is followed by 0) but the fourth digit is 3, (an odd number), so we increase the fourth digit by I. (b) The number 3.14450 rounded off to four significant digits is 3.144. Here in this case the fifth digit is 5 and is followed by a zero and the fourth digit is 4, an even number so we do not increase the fourth digit. (c) The number 9.2535, when rounded off to 3, 2, 1 places of decimals are 9.254, 9.25, 9.3 respectively. But if 4.25 is rounded off to one decimal place, we get it as 4.2. II 4.25 = 4.2501

1.6

ERROR DUE TO ROUNDING OFF TIre difference between allumber X {lml its roumled off value Xl' i.e., (X - Xl) is called tlte roulld off error and is delloted by E = X - Xl" Tire maximum error flue to roumling off does not ex:ceed tile one half of tile place V{I[ue of tile last retailled digit in tile number. 1.6.1 Relative Error: The numerical difference between the exact value of a number X and its approximate value Xl obtained by rounding off or truncations is called the absolute error, i. e., X-XI and it is denoted by AX. Here AX = X-Xl.

1.6.2

Relative Error: E = R

0_:_~11 = L~~J X X

is called the relative error. It is a dimension less

quantity. 1.6.3

Percentage Error: The quantity

0-=X__~

x 100 is called the Percentage Error and is

denoted by E p" i.e., Percentage Error: E p =

I_~~~_d

x 100

Example 3. Round off' the numbers 7.2575, 20.35450 to three places oldecimals. Also find (i) the round off' error (ii) relative error (iii) percentage error. Solution. (i) The number 7.2574 rounded off to three places of decimals is 7.258. .. Error E = X - Xl = 7.2575 - 7.258 = - 0.0005.

5

Significant Digits and Rounding of Numbers

L~ - XI I =_LP~l =-

Relative Error: ER

X

Percentage Error =

OX

-X--

x

0.0005 7.2574

X

=

0.0000689.

0.0005 100 ~ 7-.2574- = 0.000689.

(it) The number 20.35450 rounded off to three places of decimals is 20.354. Error E X - XI = 20.3545 - 20.354 = 0.0005.

I X - ~ _-

· E rror: E T R e Ia t Ive

X 0.0000245

OX = _~~O_~~_ -- 0.0000245. X 20.3545 100 = 0.00245.

x Percentage Error Example 4. If 75362 is approximated to three significant digits. then find the percentage errol'.

Solution. Approximation of753.62 to three significant digits ~. 754. X = 753.62 and X\ ~ 754. 0.38 754- 753.62 = --< 753.62 753.62

X- XI

E R = Relative Error

X

Percentage Error

=

ER

X

0.38 100 = --6')- x 100 753. _

=

=

0.000504.

0.0504.

Example 5. A solar year contains 365.242218 earthly days. Find the percentage error in taking a year to consist ()f365 days. Solution. Absolute Error 365.242218'- 365 = 0.242218 day or 5.813232 hrs. X - XI

0.242218 365.242218

------- = - - - - - =

Relative Error

X

ER

Percentage Error

X

100 = 0.0007 x 100

0 0007 (correct to four decimal places) . .

=

0.07%.

EXERCISE - 1.1

t. Find the number of significant digits in the number 8.00312. 2. The number (5/6) is represented approximately by 0.8333, what is the percentage error? .

(5/6)- O.!G33

,

[BlOt. Percentage Error = ----------- --.---- x 100 = 0.004%.] (5/6)

3. If 0.71954 is approximated by 0.720, then find the number of significant digits in 0.72&. 4. A student approximated 25.001 as 25. What is the percentage error in his calculations? [Hint. Percentage Error = =

IX -

X

XII x 100

25.001- 25 ---25.00(- x 100=0.00004 x 100=0.004%.]

5. The number 0.00243468 is rounded off to four significant digits. What is the new number? ANSWERS I. 8, 0, 0, 3, I, 2.

2. 0.004%.

3. 7,2.

4. 0.004%.

5. 0.002435.

Classification -of Data 2.1

DATA

Data The information collected through censuses and surveys or in a routine manner or other sources is called a raw data. The word d~ta means information (its literary meaning is given as facts). The adjective raw attached to data indicates that the information thus collected and recorded .cannot be put to any use immediately and directly. It has to be converted into more suitable form or processed before it begins to make sense to be utilised gainfully. A raw data is a statistical data in original form before any statistical techniques are u'sed to redefine, process or summarize it. There are two types of statistical data: (i) Primary data (il) Secondary data 2.1.) Primary data It is the data collected by a particular person or. organisation for his own lIse/i'om the primary source. 2.1.2 Secondary data It is the data collected by some oth~r person or organisation for their own use but the investigator also gets it for his use. In other words, the primary data are those data whi~h are collected by you to meet your own specific purpose, whereas the secondary data are those data which are c