Area.doc 4/5/06 Use of Area Programs To use any of these programs, open Minitab, click on any place in the ‘session’ part of the screen and, using the ‘Editor’ pulldown menu, click on ‘Enable Commands.’ Now find (using the ‘file’ pulldown menu and ‘Open Worksheet’) or prepare a worksheet and call the macro using a command beginning with ‘%.’ To arrange the graphs to print together, click on one of the graphs and then, using the ‘Editor’ pulldown menu, click on ‘Layout Tool.’ Use the arrows provided to remove the graph (click on it first) in the layout and then pick the number of rows and columns and use the arrows to put the graphs in the layout in the order they were made. The most recent A versions of these programs, NormArea6A, ChiArea6A, tArea6A and FArea6A are selfprompting, as are the older versions, NormArea5A, ChiArea5A, tArea5A and FArea5A. These do not require a worksheet. I find it convenient to prepare and save a dummy worksheet and to store it in the same file in which the Macros are kept. Then, when the macros are called, there is no problem finding them. To download the version 6 routines, follow the instructions in Areadoc2. The version 5 routines are in AreaRoutines.doc. Each of them can be copied using notepad and changing the suffix on the stored routines from ‘.txt’ to ‘.mac’. The C versions of these routines (NormArea6C, ChiArea6C, etc.) require input to be set up in advance and examples of this are shown below. The difference between the 5 versions and the 6 versions is line density in the graphs. Instructions for copying the denser, better graphs from version 6 are given in AreaRoutines.doc. An example of the use of NormArea5A follows. All my input was put in when the program asked for it. ————— 1/28/2005 10:08:24 PM ———————————————————— Welcome to Minitab, press F1 for help. MTB > WOpen "C:\Documents and Settings\rbove\My Documents\Minitab\notmuch.MTW". Retrieving worksheet from file: 'C:\Documents and Settings\rbove\My Documents\Minitab\notmuch.MTW' Worksheet was saved on Fri Jan 21 2005 Results for: notmuch.MTW (This worksheet is just a few numbers that are not used. Finding this sheet orients Minitab so that it knows that the data and macros are in a file that I created called Minitab’) MTB > %NormArea5A Executing from file: NormArea5A.MAC Graphic display of normal curve areas Finds and displays areas to the left or right of a given value or between two values. (This macro uses C100-C116 and K100-K116) Enter the mean and standard deviation of the normal curve. DATA> 883 DATA> 100 Do you want the area to the left of a value? (Y or N) n Do you want the area to the right of a value? (Y or N) y Enter the value for which you want the area to the right. DATA> 700 ...working... Normal Curve Area 1 Area.doc 4/5/06 Normal Curve with Mean 883 and Standard Deviation 100 The Area to the Right of 700 is 0.9664 0.004 Density 0.003 0.002 0.001 0.000 400 500 600 700 800 900 Data Axis 1000 1100 1200 1300 Documentation for NormArea5c Input for NormArea5c – Material is in worksheet 252PrA1d-f, which generates the solution to Problem A1, parts d-f. #C1 contains means, C2 contains standard deviations #C3 contains lower limits of intervals, C4 contains upper limits of intervals #C5 contains 0 if Area is between points in C3 and C4 #C5 contains 1 if Area is to the left of point in c4 #C6 contains 2 if Area is to the right of point in C3 So the first row below asks for a Normal curve with mean 5 and Standard deviation 6. It wants the probability between 8 and 9. Row 1 2 3 4 5 6 C1 5 0 5 0 5 0 C2 6 1 6 1 6 1 C3 8.00 0.50 2.00 -0.50 3.00 -0.33 C4 9.00 9.00 9.00 9.00 6.00 0.17 C5 2 2 2 2 0 0 Computer Output for this Worksheet follows. ————— 1/28/2005 10:44:37 PM ———————————————————— Welcome to Minitab, press F1 for help. MTB > WOpen "C:\Documents and Settings\rbove\My Documents\Minitab\252PrA1df.MTW". Retrieving worksheet from file: 'C:\Documents and Settings\rbove\My Documents\Minitab\252PrA1d-f.MTW' Worksheet was saved on Thu Jan 20 2005 Results for: 252PrA1d-f.MTW MTB > %NormArea5C Executing from file: NormArea5C.MAC 2 Area.doc 4/5/06 Executing from file: NormArea5.MAC ...working... Normal Curve Area ...working... Normal Curve Area ...working... Normal Curve Area ...working... Normal Curve Area ...working... Normal Curve Area ...working... Normal Curve Area Graphs Follow. Normal Curve with Mean 5 and Standard Deviation 6 The Area to the Right of 8 is 0.3085 Normal Curve with Mean 0 and Standard Deviation 1 The Area to the Right of 0.5 is 0.3085 0.4 Density Density 0.050 0.025 0.000 -20 0 0.2 0.0 20 -5.0 -2.5 Data Axis Normal Curve with Mean 5 and Standard Deviation 6 The Area to the Right of 2 is 0.6915 0.0 Data Axis 2.5 5.0 Normal Curve with Mean 0 and Standard Deviation 1 The Area to the Right of -0.5 is 0.6915 0.4 Density Density 0.050 0.025 0.000 -20 0 0.2 0.0 20 -5.0 -2.5 Data Axis Normal Curve with Mean 5 and Standard Deviation 6 The Area Between 3 and 6 is 0.1967 0.0 Data Axis 2.5 5.0 Normal Curve with Mean 0 and Standard Deviation 1 The Area Between -0.33 and 0.17 is 0.1968 0.4 Density Density 0.050 0.025 0.000 -20 0 20 Data Axis 0.2 0.0 -5.0 -2.5 0.0 Data Axis 2.5 5.0 3 Area.doc 4/5/06 Documentation for ChiAreaC and ChiAreaA Input for ChiAreaC – Material in worksheet ChiEx1 #C1 contains degrees of freedom, C2 contains zero #C3 contains lower limits of intervals, C4 contains upper limits of intervals #C5 contains 0 if Area is between points in C3 and C4 #C5 contains 1 if Area is to the left of point in c4 #C6 contains 2 if Area is to the right of point in C3 So the first row below asks for a ChiSquare curve with 4 degrees of freedom and the area between -4 and +4. The second line asks for the area to the left of 20.4832 when there are 10 DF. Row 1 2 3 4 5 C1 4 10 10 10 50 C2 0 0 0 0 0 C3 -4.0000 3.2470 3.2470 3.2470 27.9907 C4 4.0000 20.4832 20.4832 20.4832 79.4896 C5 0 1 2 0 0 Graphs Follow. ChiSquared Curve with 4 Degrees of Freedom and Standard Deviation 2.82843 The Area Between -4 and 4 is 0.5940 ChiSquare Curve with 10 Degrees of Freedom and Standard Deviation 4.47214 The Area to the Left of 20.4832 is 0.9750 0.10 Density Density 0.2 0.1 0.0 0 6 12 Data Axis 18 0.00 24 ChiSquare Curve with 10 Degrees of Freedom and Standard Deviation 4.47214 The Area to the Right of 3.247 is 0.9750 10 20 Data Axis 30 40 0.10 Density Density 0 ChiSquared Curve with 10 Degrees of Freedom and Standard Deviation 4.47214 The Area Between 3.247 and 20.4832 is 0.9500 0.10 0.05 0.00 0.05 0 10 20 Data Axis 30 40 0.05 0.00 0 10 20 Data Axis 30 40 ChiSquared Curve with 50 Degrees of Freedom and Standard Deviation 10 The Area Between 27.9907 and 79.4896 is 0.9900 Density 0.04 0.02 0.00 20 40 60 Data Axis 80 100 Computer Output for this Worksheet follows. ————— 1/28/2005 7:22:02 PM ———————————————————— Welcome to Minitab, press F1 for help. Results for: ChiEx1.MTW MTB > Save "C:\Documents and Settings\rbove\My Documents\Minitab\ChiEx1.MTW"; SUBC> Replace. 4 Area.doc 4/5/06 Saving file as: 'C:\Documents and Settings\rbove\My Documents\Minitab\ChiEx1.MTW' Existing file replaced. MTB > %ChiAreac Executing from file: ChiAreac.MAC Executing from file: ChiArea.MAC ...working... Chi Squared Curve Area Data Display mode median 2.00000 3.33333 ...working... Chi Squared Curve Area Data Display mode median 8.00000 9.33333 ...working... ChiSquare Curve Area Data Display mode median 8.00000 9.33333 ...working... Chi Squared Curve Area Data Display mode median 8.00000 9.33333 ...working... Chi Squared Curve Area Data Display mode median 48.0000 49.3333 MTB > 5 Area.doc 4/5/06 Input for ChiAreaA – There is no input prepared for this version because the program requests the information from you. The nonsense worksheet ‘notmuch’ was found and used to orient Minitab as to where the Macros were. Output for ChiAreaA ChiSquared Curve with 20 Degrees of Freedom and Standard Deviation 6.32456 The Area Between 10 and 15 is 0.1918 0.07 0.06 Density 0.05 0.04 0.03 0.02 0.01 0.00 0 10 20 30 Data Axis 40 50 Computer Output for this Macro follows. ————— 1/28/2005 8:23:44 PM ———————————————————— Welcome to Minitab, press F1 for help. Results for: notmuch.MTW MTB > %ChiAreaA Executing from file: ChiAreaA.MAC Graphic display of chi square curve areas Finds and displays areas to the left or right of a given value or between two values. (This macro uses C100-C116 and K100-K120) Enter the degrees of freedom. DATA> 20 Do you want the area to the left of a value? (Y or N) n Do you want the area to the right of a value? (Y or N) n 6 Area.doc 4/5/06 Enter the two values for which you want the area between. DATA> 10 DATA> 15 ...working... Chi Squared Curve Area Data Display mode median 18.0000 19.3333 7 Area.doc 4/5/06 Documentation for tAreaC and tAreaA Input for tAreaC – Material in worksheet tEx1 #C1 contains degrees of freedom, C2 contains zero #C3 contains lower limits of intervals, C4 contains upper limits of intervals #C5 contains 0 if Area is between points in C3 and C4 #C5 contains 1 if Area is to the left of point in c4 #C6 contains 2 if Area is to the right of point in C3 So the first row below asks for a t curve with 41 degrees of freedom and the area between -1.303 and +1.303. The second line asks for the area to the left of 1.303 when there are 10 DF. Row 1 2 3 4 5 C1 41 41 41 120 4 C2 0 0 0 0 0 C3 -1.303 -1.303 -1.303 -0.677 -3.747 C4 1.303 1.303 1.303 0.677 3.747 C5 0 1 2 0 0 Graphs Follow. t Curve with 41 Degrees of Freedom and Standard Deviation 1.02532 The Area Between -1.303 and 1.303 is 0.8002 t Curve with 41 Degrees of Freedom and Standard Deviation 1.02532 The Area to the Left of 1.303 is 0.9001 0.4 Density Density 0.4 0.2 0.0 -5.0 -2.5 0.0 Data Axis 2.5 0.2 0.0 5.0 t Curve with 41 Degrees of Freedom and Standard Deviation 1.02532 The Area to the Right of -1.303 is 0.9001 0.0 Data Axis 2.5 5.0 0.4 Density Density -2.5 t Curve with 120 Degrees of Freedom and Standard Deviation 1.00844 The Area Between -0.677 and 0.677 is 0.5003 0.4 0.2 0.0 -5.0 -5.0 -2.5 0.0 Data Axis 2.5 5.0 0.2 0.0 -4 -2 0 Data Axis 2 4 t Curve with 4 Degrees of Freedom and Standard Deviation 1.41421 The Area Between -3.747 and 3.747 is 0.9800 Density 0.4 0.2 0.0 -10 -5 0 Data Axis 5 10 Computer Output for this Worksheet follows. ————— 1/28/2005 9:41:47 PM ———————————————————— Welcome to Minitab, press F1 for help. Results for: tEx1.MTW MTB > WOpen "C:\Documents and Settings\rbove\My Documents\Minitab\tEx1.MTW". 8 Area.doc 4/5/06 Retrieving worksheet from file: 'C:\Documents and Settings\rbove\My Documents\Minitab\tEx1.MTW' Worksheet was saved on Fri Jan 28 2005 MTB > %tAreaC Executing from file: tAreaC.MAC Executing from file: tArea.MAC ...working... t Area Data Display mode median 0 0 ...working... t Curve Area Data Display mode median 0 0 ...working... t Curve Area Data Display mode median 0 0 ...working... t Area Data Display mode median 0 0 ...working... t Area Data Display mode median 0 0 9 Area.doc 4/5/06 Input for tAreaA – There is no input prepared for this version because the program requests the information from you. The previous worksheet was left alone and used to orient Minitab as to where the Macros were. Output for tAreaA MTB > %tAreaA Executing from file: tAreaA.MAC Graphic display of t curve areas Finds and displays areas to the left or right of a given value or between two values. (This macro uses C100-C116 and K100-K120) Enter the degrees of freedom. DATA> 21 Do you want the area to the left of a value? (Y or N) n Do you want the area to the right of a value? (Y or N) n Enter the two values for which you want the area between. DATA> -2.831 DATA> -0.127 ...working... t Area Data Display mode median 0 0 MTB > 10 Area.doc 4/5/06 t Curve with 21 Degrees of Freedom and Standard Deviation 1.05131 The Area Between -2.831 and -0.127 is 0.4451 0.4 Density 0.3 0.2 0.1 0.0 -5.0 -2.5 0.0 Data Axis 2.5 5.0 11 Area.doc 4/5/06 Documentation for FAreaC and FAreaA Input for FAreaC – Material in worksheet FEx1 #C1 contains degrees of freedom for numerator #C2 contains degrees of freedom for denominator – because of the variance formula that is used here, degrees of freedom for the denominator must be above 4. #C3 contains lower limits of intervals, C4 contains upper limits of intervals #C5 contains 0 if Area is between points in C3 and C4 #C5 contains 1 if Area is to the left of point in c4 #C6 contains 2 if Area is to the right of point in C3 So the first line of input below is asking for the probability between 1.5 and 3.62 for an F distribution with 3 and 5 degrees of freedom. Row 1 2 3 4 5 6 7 C1 3 3 4 50 50 50 50 C2 5 5 5 60 5 60 50 C3 1.50000 1.50000 3.62000 0.00000 6.14000 1.56000 0.69444 C4 3.62 3.62 5.00 1.56 6.00 6.00 1.44 C5 0 1 2 1 2 2 0 Graphs Follow F Curve with Numerator DF of 3 Denominator DF of 5 The Area to the Left of 3.62 is 0.9000 0.50 Density Density F Curve with numerator DF of 3 Denominator DF of 3.33333 The Area Between 1.5 and 3.62 is 0.2222 0.25 0.00 0 20 40 Data Axis 60 0.50 0.25 0.00 80 0 20 F Curve with numerator DF of 4 and Denominator DF of 5 The Area to the Ri ght of 3.62 is 0.0954 40 Data Axis 60 80 F Curve with Numerator DF of 50 Denominator DF of 60 The Area to the Left of 1.56 is 0.9502 0.50 Density Density 1.6 0.25 0.00 0 20 40 Data Axis 60 0.8 0.0 80 0.5 F Curve with numerator DF of 50 and Denominator DF of 5 The Area to the Ri ght of 6.14 is 0.0250 1.5 Data Axis 2.0 2.5 F Curve with numerator DF of 50 and Denominator DF of 60 The Area to the Right of 1.56 i s 0.0498 1.6 Density 0.8 Density 1.0 0.4 0.0 0 15 30 Data Axis 45 0.8 0.0 60 0.5 1.0 1.5 Data Axis 2.0 2.5 F Curve with numerator DF of 50 Denominator DF of 0.304084 The Area Between 0.69444 and 1.44 i s 0.7992 Density 1.6 0.8 0.0 0 1 2 3 Data Axis Computer Output for this Worksheet follows. ————— 1/29/2005 1:17:58 AM ———————————————————— Welcome to Minitab, press F1 for help. MTB > WOpen "C:\Documents and Settings\rbove\My Documents\Minitab\FEx1.MTW". Retrieving worksheet from file: 'C:\Documents and Settings\rbove\My Documents\Minitab\FEx1.MTW' 12 Area.doc 4/5/06 Worksheet was saved on Sat Jan 29 2005 Results for: FEx1.MTW MTB > %FAreaC Executing from file: FAreaC.MAC Executing from file: FArea.MAC ...working... F Curve Area Data Display mode 0.555556 Data Display std dev 3.33333 ...working... F Curve Area Data Display mode 0.555556 Data Display std dev 3.33333 ...working... F Curve Area Data Display mode 0.625000 Data Display std dev 3.11805 ...working... F Curve Area Data Display mode 0.963934 Data Display std dev 0.287323 ...working... F Curve Area Data Display mode 0.816667 Data Display std dev 2.42670 13 Area.doc 4/5/06 ...working... F Curve Area Data Display mode 0.963934 Data Display std dev 0.287323 ...working... F Curve Area Data Display mode 0.960784 Data Display std dev 0.304084 14 Area.doc 4/5/06 Input for FAreaA – There is no input prepared for this version because the program requests the information from you. The nonsense worksheet ‘notmuch’ was found and used to orient Minitab as to where the Macros were. Output for FAreaA F Curve with Numerator DF of 40 Denominator DF of 22 The Area to the Left of 2.58 is 0.9899 1.2 1.0 Density 0.8 0.6 0.4 0.2 0.0 0 1 2 3 4 5 Data Axis ————— 1/29/2005 1:48:26 AM ———————————————————— Welcome to Minitab, press F1 for help. MTB > WOpen "C:\Documents and Settings\rbove\My Documents\Minitab\notmuch.MTW". Retrieving worksheet from file: 'C:\Documents and Settings\rbove\My Documents\Minitab\notmuch.MTW' Worksheet was saved on Fri Jan 21 2005 Results for: notmuch.MTW MTB > %FAreaA Executing from file: FAreaA.MAC Graphic display of F curve areas Finds and displays areas to the left or right of a given value or between two values. (This macro uses C100-C116 and K100-K120) Enter the degrees of freedom.DF2 must be above 4. DATA> 40 DATA> 22 Do you want the area to the left of a value? (Y or N) y Enter the value for which you want the area to the left. 15 Area.doc 4/5/06 DATA> 2.58 ...working... F Curve Area Data Display mode 0.932609 Data Display std dev 0.449073 Copies of the Routines The routines and the worksheets are available in http://courses.wcupa.edu/rbove/Minitab/. They are probably easiest to download in .txt format. Either convert them back to .mac using Notepad or change all references to macros by adding .txt to the macro. For example, instead of using %FAreaA, use %FAreaA.txt. There is also a printable copy at http://courses.wcupa.edu/rbove/Minitab/AreaRoutines.doc. 16