30
Technology Hints Dr. Steven M. Sidik STAT 312 Case Western Reserve University

Basic Hints TI and Minitab

Embed Size (px)

Citation preview

Page 1: Basic Hints TI and Minitab

Technology Hints Dr. Steven M. Sidik

STAT 312 Case Western Reserve University

Page 2: Basic Hints TI and Minitab

Topics • Technology options used in this course

– TI 83/84 graphing 2-variable statistics calculator – TI 89 – has same stats functions but I am not sure how to access them – Minitab

• There are others – not used in this course

– SAS – SPSS – NCSS – R and S packages – other

Page 3: Basic Hints TI and Minitab

TI 83/84 • Data Entry:

– STAT – EDIT – 1:EDIT – Cursor to L1, CLEAR, ENTER – Cursor to L2, CLEAR, ENTER – In L1, enter data

• To choose x and y scales for plots: – Window

• Xmin, xmax, xscl • Ymin, ymax, yscl • Xres

– Graph – Or – to use defaults, use ZOOM, 9:ZOOMSTAT

• TRACE – Puts an X on the graph somewhere – Shows value corresponding to the point – Cursor left, right to see values at other points

Page 4: Basic Hints TI and Minitab

TI 83/84 • Statistics

– STAT, CALC 1: 1-VAR Stats, L1, ENTER – Will provide various numerical descriptions

• Mean • Std dev • 5-point summary

• Grouped data – Mid values in L1 – Frequencies in L2 – STAT, – CALC 1: 1-VAR Stats L1, L2, ENTER

• MUST specify BOTH L1 and L2 or calculator will just use L1 as if it were ungrouped data

Page 5: Basic Hints TI and Minitab

TI 83/84 • Histogram, Boxplot, etc.

– Once data entered in a LIST, – STAT PLOT (2nd Y=) – Select plot number to set up/turn on/off (e.g. 1)

• Turn on/off • Select type (3rd is histogram, 4th is boxplot) • Xlist – where is data? Enter L1 or wherever • Freq: 1 (means each number in Xlist represents one data value) • Freq: L2 means List 2 contains the number of times each value in L1 occurs) • Mark: choose symbol to plot • ZOOM, 9: ZOOMSTAT

Page 6: Basic Hints TI and Minitab

Use of Minitab • Must be on campus or VPN into network • Go to Case Software site and download VPN, Minitab clients as needed – you

probably already have some of these loaded.

• Windows-only. Sorry, but we Mac users must endure the scourge of Redmond

• Only need to download and install Minitab once

• System will check if a license is available to run on your pc

• NOTE – Minitab is purchased by the number of simultaneous licenses that can be checked out. During busy periods, such as just before a project or major homework is due, there may be a lot of contention for licenses. If there are no licenses available you will get a message saying something to that effect. Do not re-download Minitab. Wait a little bit and try again. Eventually you will be able to grab a license that somebody else finally releases. I know this can become a pain, but IT only has a limited budget and makes best judgments on how many licenses to buy.

Page 7: Basic Hints TI and Minitab

Wine

12.86 12.88 12.81 12.70 12.51 12.60 12.25 12.53 13.49 12.84

12.93 13.36 13.52 13.62 12.25 13.16 13.88 12.87 13.32 13.08

13.50 12.79 13.11 13.23 12.58 13.17 13.84 12.45 14.34 13.48

12.36 13.69 12.85 12.96 13.78 13.73 13.45 12.82 13.58 13.40

12.20 12.77 14.16 13.71 13.40 13.27 13.17 14.13

1/22/2012 7 Inference Overview

Alcohol content in wine depends on the grape variety, the way in which the wine was produced, the weather, and various other influences. Below is data on percent alcohol in wine produced from the same grape variety, in the same year, in the same region of Italy. In most cases, the wine is labeled as being 13% alcohol, although there is obviously a natural variability in percent. Determine a 95% confidence interval for the mean alcohol percent for all these wines, assuming all the wineries produce very closely the same amount of wine.

47,.975 50,.975

13.154.530

2.0092.009*.530 .154

4813.154 .154 (13.000,13.308)

x

Xst t

tsEn

X E

==

≈ =

= = =

± = ± =

Page 8: Basic Hints TI and Minitab

Minitab • Double click Minitab icon – opens new worksheet • Data – Enter variable name and data. Stat Basic Statistics Graphical Summary Type “Pct Alc” here Then 12.86 here 12.93 here, etc

1/22/2012 8

Page 9: Basic Hints TI and Minitab

Manufacturing of Injection Molded Parts

• Injection molding is a manufacturing process used to form many types of parts.

• Injected material usually shrinks as it cools, so the parts cavity must be oversized.

• Shrinkage is influenced by many factors, including – Injection velocity (ft/sec) – Mold temperature (deg C)

• A comparative experiment is performed where mold temperature is held at a “low” value and injection velocity is observed at two levels (“low” and “high”).

• Shrinkage of cooled parts is measured (cm x 104) for 10 specimens at each velocity.

1/22/2012 9

Page 10: Basic Hints TI and Minitab

The data • Low velocity: • High velocity • (1) The shrinkage is variable from specimen to specimen • (2) It appears the low velocity numbers tend to be larger than the high

velocity numbers.

• What would you like to know more about this experiment before you jump to the conclusion that high velocity injection seems to shrink less?

1/22/2012 10

72.68 72.62 72.58 72.48 73.07

72.55 72.42 72.84 72.58 72.92

71.62 71.68 71.74 71.48 71.55

71.52 71.71 71.56 71.70 71.50

Page 11: Basic Hints TI and Minitab

Dot Plots in Minitab • 1-Data 4-Select vars, OK

• 2-Graph, • Dotplot 5-output

• 3-Multiple y’s, OK

1/22/2012 11

Page 12: Basic Hints TI and Minitab

Results at High Temperature • Lo Vel

• Hi Vel

NOTE – scales different than previous plot

1/22/2012 12

76.20 76.09 75.98 76.15 76.17

75.94 76.12 76.18 76.25 75.82

93.25 93.19 92.87 93.29 93.37

92.98 93.47 93.75 93.89 91.62

Page 13: Basic Hints TI and Minitab

Value plots in Minitab

• 1-Data 4-Select variables

• 2-Graph menu

3-With Groups, OK

1/22/2012 13

Page 14: Basic Hints TI and Minitab

TI and Minitab

Basic Inferences

Page 15: Basic Hints TI and Minitab

TI 83/84 • Normal distribution probabilities, w/o shading

– Press 2nd + VARS – Press 2

• You should see the following: NORMALCDF( – Enter the minimum number, the maximum number, the mean, and the standard

deviation. • Enter the desired numbers with commas followed by “)”

– Example: NORMALCDF(-1, 1, 0, 1) – Press ENTER – Answer: Area = 0.682689 Low = -1, Up = 1 – -1 E 99 = -∞ (Minus Infinity ) / 1 E 99 = +∞ (Plus Infinity) – Clear the calculations before using NORMALCDF again – To Clear: Press 2nd + PRGM, Press 1, and then Press CLEAR twice

• Find x for a given normal distribution % – Press DISTR (2nd + VARS) – Press 3

• You should see the following: invNorm( – Enter the area to the left of the unknown number, the mean, and the standard

deviation. • Enter the desired numbers with commas followed by “)”

– Example: invNORM(0.3, 0, 1) – Press ENTER – Answer: - 0.5244 (30% of the area is below -0.5244) – Clear the calculations before using invNorm again – To Clear: Press CLEAR

Page 16: Basic Hints TI and Minitab

Other probability distributions • Students t

• Chi-squared

• F-distribution

• Binomial

• Poisson

• NOTE – TI 89 function arguments are slightly different for a couple of distributions. You really should check the pdf user manual downloadable from TI web site.

2 2( , , ) ( )dfcdf lower upper df P lower upperχ χ= ≤ ≤

( , , ) ( )dftcdf lower upper df P lower t upper= ≤ ≤

( , , , ) ( )Fcdf lower upper numdf denomdf P lower F upper= ≤ ≤

( , , ) ( )binomcdf numtrials p x P X x= ≤

( , ) ( )poissoncdf x P X xµ = ≤

Page 17: Basic Hints TI and Minitab

TI 83/84 – Tests, estimation • STAT, cursor right to TESTS

– Select desired Test/Interval, ENTER – Fill in appropriate values, then Calculate (or Draw)

• Example – one sample mean

– STAT -> 1: EDIT -> enter data in L1 – STAT -> TESTS ->

• Z-Test, T-Test, ZInterval, TInterval as appropriate, select/fill in template – e.g., Z-Test

– DATA – Mu0= – Sigma= – LIST: – Freq:1 – Mu option – Calculate or Draw

Page 18: Basic Hints TI and Minitab

Example – bile acid

• Eighteen subjects had their gall bladder removed surgically. • Just prior to surgery, their level of a marker for bile acid was

measured, and then one month after surgery it was re-measured. The decrease (prior – after) values observed were:

• What can we say about the mean decrease?

1/22/2012 18

19.89 14.67 18.34 10.08

21.1 20.74 13.81 4.79

2.64 28.91 7.2 14.78

12.26 13.69 3.11

9.25 25.98 9.45

Page 19: Basic Hints TI and Minitab

Example – bile acid • First, examine the distribution assumption: • TI: Enter data (say in L1), • 2nd STATPLOT, select last graph icon and List containing data, ZOOM 9 • Minitab: • Graph Probability plot select normal

1/22/2012 19

Page 20: Basic Hints TI and Minitab

Bile Acid, Interval Using z-distribution • Store data in a list, say L1 • Assume we can use sample standard deviation estimate in place of sigma • STAT TESTS 7: ZInterval

• Result, :

• Conclusion: the mean change is somewhere inside the above interval with a probability of .95 we are correct.

1/22/2012 20

1

:: 7.502

::1

: .95

Inpt Data

List LFreqC LevelCalculate

σ

(10.462,17.393)

Page 21: Basic Hints TI and Minitab

Bile Acid, Test Using z-distribution • Store data in a list, say L1 • Assume we can use sample standard deviation estimate in place of sigma • STAT TESTS 1: Z-Test

• Result:

• Conclusion: the p-value is much smaller than any reasonable significance level, so we conclude there is a statistically significant effect of gall bladder removal on bile marker.

1/22/2012 21

0

1

0

:: 0

: 7.502::1

:

Inpt Data

List LFreq

Calculate

µσ

µ µ≠

7.8763.40 15

zp E== −

Page 22: Basic Hints TI and Minitab

Bile Acid, Interval Using t-distribution instead of z • Store data in a list, say L1 • STAT TESTS 8: T-Interval

• Result:

• Conclusion: the mean change is somewhere inside the above interval with a probability of .95 we are correct. Note the result is fairly close to that assuming sigma known.

1/22/2012 22

1

:::1

: .95

Inpt DataList LFreqC LevelCalculate−

(10.197,17.658)

Page 23: Basic Hints TI and Minitab

Bile Acid, Test Using t-distribution • Store data in a list, say L1 • Assume we can use sample standard deviation estimate in place of sigma • STAT TESTS 2: t-Test

• Result:

• Conclusion: the p-value is much smaller than any reasonable significance level, so we conclude there is a statistically significant effect of gall bladder removal on bile marker.

1/22/2012 23

0

1

0

:: 0

::1

:

Inpt Data

List LFreq

Calculate

µ

µ µ≠

7.87684.51 7

tp E== −

Page 24: Basic Hints TI and Minitab

Example - Bacteria • Researchers in a hospital wanted to determine if rooms with carpeting

contained more bacteria than un-carpeted rooms. They selected 8 rooms at random from a part of the hospital that had carpeting, and 8 other rooms at random from a part without carpeting.

• In each room they set up apparatus to pass room air over a Petri dish for 15 minutes at a flow rate of 1 cubic foot per minute. The Petri dishes were then incubated for 48 hours. The number of bacteria colonies per cubic foot of air was computed, obtaining:

• Let us examine these results under the temporary assumption the levels of bacteria colonies would be the same for each type of room.

1/22/2012 24

Carpeted 11.8 8.2 7.1 13.0 10.8 10.1 14.6 14.0

Un-carpeted

12.1 8.3 3.8 7.2 12.0 11.1 10.1 13.7

Page 25: Basic Hints TI and Minitab

Example – Bacteria contd. • If we assume the bacteria levels have the same (normal) distribution, then

• Unfortunately we do not know the standard deviation.

1/22/2012 25

( ) ( )1 21

2

2

21 1

22 2

2 2 21 2 1 2

1 22 2

1 2 1 2

1 22

: Mean , Variance

: Mean , Variance

Where we assume and

Then is normally distributed with

0, / /

0

X XX X

Carpeted

Un carp

X X

n n

X XZ

µ σ

µ σ

µ µ σ σ σ

µ µ µ σ σ σ

σ

−−

= = =

= − = =

− −=

+

21 2

distributed ( ;0,1)/ /

n zn nσ+

Page 26: Basic Hints TI and Minitab

Example - Bacteria • The two samples can be examined for conformance to following a normal

distribution via normal probability plots of the samples:

1/22/2012 26

Page 27: Basic Hints TI and Minitab

Example – Bacteria • From the data, suppose we were to assume both samples came from normal distributions

with the same standard deviation of 3. Then:

• It seems the difference between the two sample means is pretty close to zero, compared to

the variability expected, which is pretty consistent with the population means being close to each other.

• Our temporary assumption of equal means seems reasonable on the basis of this data. • Perhaps it is OK to behave as if the two means are the same until or unless we obtain more

data.

1/22/2012 27

( )2 2

11.20 9.79.96

(3) / 8 / 8(3)Z

−= =

+

Page 28: Basic Hints TI and Minitab

Example – capital punishment • In the past 40% of adults favored capital punishment. If a r.s. of n=150 adults

yields X=80 in favor, is that evidence (at the .05 level) that the population proportion has increased?

• By hand

1/22/2012 28

0 0

1 0

0 0 0 0

0 .95 0 0

0

:

:

desired .05

ˆ / ( , / ) when is true

ˆDetermine critical value such that ( )That is,

/ .40 1.645 (.4)(.6) /150 .4658

ˆ 80 /150 .5333 so we reject

c c

c

c

H p p

H p p

p X n n p p q n H

p P p p

p p z p q n

p p H

α

α

=

>

=

=

≥ ≈

= + = + =

= = >

Page 29: Basic Hints TI and Minitab

Capital Punishment • On TI

• P-value of 4.29E-4 is way smaller than .05, so REJECT H0

STAT-->TESTS-->5:1-PropZTest0 : .4:80:150

: 0

.43.333334.29 4

ˆ .5333

pxnprop pCalculate

propzp Ep

>

>== −−

Page 30: Basic Hints TI and Minitab

Capital Punishment • On TI

• NOTE: We used a one-sided test with significance level .05. Since TI only calculates two-sided intervals, we needed to use the 90% level, and should only pay attention to the left end of the interval. We infer p>.45.

STAT-->TESTS-->A:1-PropZInt:80:150

: .90

(.4535,.61317)ˆ .5333

150

xnC LevelCalculate

pn

−=