• No results found

Part I Learning about SPSS

N/A
N/A
Protected

Academic year: 2021

Share "Part I Learning about SPSS"

Copied!
7
0
0

Loading.... (view fulltext now)

Full text

(1)

STATS 1000 / STATS 1004 / STATS 1504

Statistical Practice 1

Practical Week 5

2015

Practical Outline

In this practical, we will

• look at how to do binomial calculations in Excel. • look at how to do normal calculations inExcel.

Part I – Learning about SPSS

1

Opening

Excel

First, start Excelby clicking on the icon at the bottom of your screen.

(Or choose: Start>All Programs>Microsoft Office>Microsoft Office Excel 2007)

2

Binomial Calculations in Excel

Binomial probabilities can be calculated in Excel using the built-in function

BINOMDIST. The easiest way to calculate a single binomial probability is as fol-lows.

(2)

(Alternatively, from the Formulas menu, select Insert Function. )

2. In theInsert Functiondialog box, selectCategory:Statistical, followed byFunction:BINOMDIST.

3. Enter the required function arguments in the BINOMDIST dialog box before clicking on OK.

Number s The number of successes, x.

(3)

0.0 0.1 0.2 0.3 0 1 2 3 4 5 6 x cumulative = 1

(a)P(X≤x) orange boxes.

0.0 0.1 0.2 0.3 0 1 2 3 4 5 6 x cumulative = 0 (b)P(X =x) orange box. Figure 1: Difference between cumulative = 1 and cumulative = 0

Probability s The probability of success in a single trial,p.

Cumulative 1(TRUE) or 0(FALSE) (See Figure 1).

Enter 1(TRUE) if the value to be calculated is the probability of being less than or equal to the number given in Numbers s.

Enter 0(FALSE) if the value to be calculated is the probability of being equal to the number given in Numbers s

For example is X ∼ Bin(10,0.5) and you want to calculate the probability that X is less than or equal to 2, then you would enter

Number s 2

Trials 10

Probability s 0.5

(4)

If you toss a fair coin 10 times, what is the probability of • no heads,

• 3 or less heads, • at least one head,

• between 1 and 3 heads (inclusive)? Question

Solutions

LetX be the number of heads, then

X ∼Bin(10,1/2) • P(X = 0) =BINOMDIST(0,10,0.5,0)= 0.0010 • P(X ≤3) = BINOMDIST(3,10,0.5,1)= 0.1719 • P(X ≤1) = 1−P(X = 0) = 1−BINOMDIST(0,10,0.5,0)= 0.9990 • P(1≤X ≤3) =P(X ≤3)−P(X = 0) =BINOMDIST(3,10,0.5,1) - BINOMDIST(0,10,0.5,0) = 0.1709

3

Normal Probabilities

Normal probabilities can be obtained inExcelusing the built-in functionNORMDIST

as follows.

1. In theInsert Functiondialog box, selectCategory:Statistical, followed byFunction:NORMDIST (Note: not NORMSDIST).

2. Enter the required function arguments in the NORMDIST dialog box before clicking on OK.

x The real number x.

Mean The real number µ.

Standard dev The real number σ >0.

Cumulative You should enter 1(TRUE) as we require the cumulative

(5)

The value calculated is the probability that X is less than or equal to the number x for X ∼N(µ, σ) (See Figure 2).

X

Figure 2: P(X ≤x) for normal distribution (orange area).

Note: a separate function NORMSDIST is also provided.

• This function has just a single argument z and calculates the probability that the standard normal random variable is less than or equal toz.

• It is equivalent to using NORMDISTwith µ= 0 andσ = 1.

The inverse cumulative distribution function can also be calculated inExcel. The inverse cumulative distribution function gives the constantcsuch that probability that X is less than or equal to cis equal to some given probabilityp. TheExcel function to do this isNORMINV. It is used as follows:

1. In theInsert Functiondialog box, selectCategory:Statistical, followed byFunction:NORMINV (Note: not NORMSINV).

2. Enter the required function arguments in the NORMINV dialog box before clicking on OK.

Probability The number pwith 0< p <1.

Mean The real number µ.

(6)

The value calculated is the solution x∗ to the equation P(X≤x∗) =p forX ∼N(µ, σ).

The weight of cats is normally distributed with a mean of 4kg and a standard deviation of 0.5kg. What is the probability of

• a randomly selected cat weighs less than 3kg? • a randomly selected cat weighs more than 4kg?

• a randomly selected cat weighs more than 4kg or less than 3kg? • a randomly selected cat weighs between 3 and 4kg?

What weight cis such that 10% of all cats are less than this weight? Question Solutions • P(X <3) =NORMDIST(3,4,0.5,1) = 0.0228. • P(X >4) = 1−P(X≤4) = =1 - NORMDIST(4,4,0.5,1) = 0.5 • P(X >4 or X <3) =P(X >4) +P(X <3)=NORMDIST(3,4,0.5,1) + (1 - NORMDIST(4,4,0.5,1)) = 0.5228. • P(3 ≤ X ≤ 4) = P(X ≤ 4) − P(X ≤ 3) =NORMDIST(4,4,0.5,1) -NORMDIST(3,4,0.5,1) = 0.4772.

Use NORMINV(0.2,4,0.5) to give the answer 3.58 kg

Part II – Assignment Questions

Usingexcel answer the following questions.

1. A multiple choice test has 15 questions. Each question has 5 candidate answers of which exactly 1 is correct. Suppose a certain student answers each question by randomly choosing one of the five answers.

Make sure you have checked your answers with the lab tutor.

LetX be the number correctly answered. (a) What is the distribution of X?

(7)

Solutions

No solutions as assignment questions

(c) Find the probability the student gets at most 4 correct answers. (d) Find the probability the student gets 6 or more correct answers.

(e) Find the probability the student gets between 4 and 10 correct answers (inclusive).

2. The weight of mice is known to be normally distributed with a mean of 10grams and a standard deviation of 1gram.

(a) What is the probability that a randomly selected mouse weighs less than 10 grams?

(b) What is the probability that a randomly selected mouse weighs more than 11 grams?

(c) What is the probability that a randomly selected mouse weighs between 8 and 12 grams?

(d) What is the weightcsuch that the probability that a randomly selected mouse weighs less than cis 0.01?

Part III – Appendix

A

Probability notation

X ∼Bin(n, p): The random variableX has a binomial distribution with the num-ber of trials n and the probability of success p.

X ∼N(µ, σ): The random variable X has a normal distribution with a mean of µand a standard deviation of σ.

P(X=x): The probability that the random variable X is equal tox.

References

Related documents

All of the participants were faculty members, currently working in a higher education setting, teaching adapted physical activity / education courses and, finally, were

–  Use Apex code to access external REST API’s –  Can be used to send data out or pull data in to/.. from an

An analysis of the economic contribution of the software industry examined the effect of software activity on the Lebanese economy by measuring it in terms of output and value

Inverse modeling of soil water content to estimate the hydraulic properties of a shallow soil and the associated weathered bedrock.. Ayral

All records for LASIK procedures from one single cen- ter without patient identifiers were extracted from the Optical Express electronic medical record system using the

According to the hydrodynamic lubrication and friction generation mechanisms, vibra- tion responses of a journal bearing can be modelled to take into account two more fault

En tractar-se d'una de les plantes més rares de la vegetació dunar de l'illa qualsevol nova localitat que es pugui coneixer té intereso La seva escassetat no només

The paper argues that there is a breakup of community social structures as evident from changes in family relations in critical domains such as extra-marital relations, sexual