Probability and Statistics for Computer Science The statement that - - PowerPoint PPT Presentation

probability and statistics
SMART_READER_LITE
LIVE PREVIEW

Probability and Statistics for Computer Science The statement that - - PowerPoint PPT Presentation

Probability and Statistics for Computer Science The statement that The average US family has 2.6 children invites mockery Prof. Forsyth reminds us about criAcal thinking Credit: wikipedia Hongye Liu, Teaching Assistant


slide-1
SLIDE 1

ì

Probability and Statistics for Computer Science

“The statement that “The average US family has 2.6 children” invites mockery” –

  • Prof. Forsyth reminds us

about criAcal thinking

Hongye Liu, Teaching Assistant Prof, CS361, UIUC, 8.27.2020 Credit: wikipedia
slide-2
SLIDE 2

Last lecture

Welcome/OrientaAon Big picture of the contents Lecture 1 - Data VisualizaAon &

Summary (I)

Some feedbacks

is

slide-3
SLIDE 3

Warm up question:

What kind of data is a le[er grade? What do you ask for usually about the

stats of an exam with numerical scores?

slide-4
SLIDE 4

Objectives

Grasp Summary StaAsAcs Learn more Data VisualizaAon for

Rela2onships

slide-5
SLIDE 5

Summarizing 1D continuous data

For a data set {x} or annotated as {xi}, we summarize with:

LocaAon Parameters Scale parameters

N

items

Mean tu)

,

Median , Mode standard egg

Interquartile

deviation

'

range ciqr)

variance (62 )

slide-6
SLIDE 6

Summarizing 1D continuous data

Mean

mean(xi) = 1 N

N

  • i=1

xi

It’s the centroid of the data geometrically, by idenAfying the data set at that point, you find the center of balance.

slide-7
SLIDE 7

{ Ki )

it [ 1,87 {Ki}=1 ,

2 ,

3 ,

4 ,

5 ,

6 ,

7,

12

E'

ga

TIKI

  • meancfxi},=o
slide-8
SLIDE 8

Properties of the mean

Scaling data scales the mean TranslaAng the data translates the mean

mean({k · xi}) = k · mean({xi})

mean({xi + c}) = mean({xi}) + c

meant a {Ki} t e)

= a means{xi}) t C
slide-9
SLIDE 9

Less obvious properties of the mean

The signed distances from the mean

sum to 0

The mean minimizes the sum of the

squared distance from any real value

N
  • i=1

(xi − mean({xi})) = 0

argmin

µ N
  • i=1

(xi − µ)2 = mean({xi})

I

WE

slide-10
SLIDE 10

N

prove I l ki

  • meant {ki ), )=o
E-I

LHS

:

Ei,cxi ) - II.

mean '":3 )

numen

N

E Xi

meemflx:D =

N

LHS :

÷÷xi,

  • IN
.

=o

slide-11
SLIDE 11

Prove

argmuin Eic * u) - = mean 4%3 ,

d ⇐ f )

N df

8=-24 -ie

  • = ? -

f

  • cxi.ee)'

die

u 't dm = ga
  • E. et :

÷

.
  • da

's :*

  • 28=0
= Erg
  • e - t)

ddtg

  • _ 2g

it

\

= -EE,ag=o

dashed"I

= -I
slide-12
SLIDE 12 N

Z g

  • o

g

. ' = Ki -ee
  • ( Xi -M ) =o

2

E-I N N
  • 2
( ki )
  • I µ = o
F- I F- I N N . µ = 0
  • 2 Xi
  • c- '
  • I
N ^

I I

µ

= = mean N

Arginine

. . . , = mean
slide-13
SLIDE 13

Q1:

What is the answer for

mean(mean({xi})) ?

  • A. mean({xi}) B. unsure C. 0
slide-14
SLIDE 14

Standard Deviation (σ)

The standard devia-on

std({xi}) =

  • 1

N

N
  • i=1

(xi − mean({xi}))2

=

  • mean({(xi − mean({xi}))2})

1-= ex -at

Arginine -2 f = mean u
slide-15
SLIDE 15
  • Q2. Can a standard deviation of a dataset

be -1?

  • A. YES
  • B. NO
slide-16
SLIDE 16

Properties of the standard deviation

Scaling data scales the standard deviaAon TranslaAng the data does NOT change the

standard deviaAon std({k · xi}) = |k| · std({xi})

std({xi + c}) = std({xi})

slide-17
SLIDE 17 A

.¥l

I

2 mum 3

y

slide-18
SLIDE 18

Standard deviation: Chebyshev’s inequality (1st look)

At most items are k standard

devia-ons (σ) away from the mean

Rough jus-fica-on: Assume mean =0

N k2 −kσ

std =

  • 1

N [(N − N k )02 + N k2(kσ)2] = σ

0.5N k2 0.5N k2 N − N k2

A

#

( o - O)
  • O
slide-19
SLIDE 19

Variance (σ2)

Variance = (standard deviaAon)2 Scaling and translaAng similar to standard

deviaAon

var({xi}) = 1 N

N
  • i=1

(xi − mean({xi}))2

var({k · xi}) = k2 · var({xi})

var({xi + c}) = var({xi})

}

I

slide-20
SLIDE 20

Q3: Standard deviation

What is the value of

std(mean({xi}) ?

  • A. 0 B. 1 C. unsure
D
slide-21
SLIDE 21

Standard Coordinates/normalized data

The mean tells where the data set is and the

standard devia,on tells how spread out it is. If we are interested only in comparing the shape, we could define:

We say is in standard coordinates

{ xi}

  • xi = xi − mean({xi})

std({xi})

IT

for every i

C

slide-22
SLIDE 22

Q4: Mean of standard coordinates

μ of is:

  • A. 1 B. 0 C. unsure

{ xi}

  • xi = xi − mean({xi})

std({xi})

I

i.

mean

slide-23
SLIDE 23

Q5: Standard deviation (σ) of standard coordinates

σ of is:

  • A. 1 B. 0 C. unsure

{ xi}

  • xi = xi − mean({xi})

std({xi})

O

l

Std

slide-24
SLIDE 24

Q6: Variance of standard coordinates

Variance of is:

  • A. 1 B. 0 C. unsure

{ xi}

  • xi = xi − mean({xi})

std({xi})

slide-25
SLIDE 25

Q7: Estimate the range of data in standard coordinates

EsEmate as close as possible, 90% data

is within:

  • A. [-10, 10]
  • B. [-100, 100]
  • C. [-1, 1]
  • D. [-4, 4]
  • E. others
  • xi = xi − mean({xi})

std({xi})

I

slide-26
SLIDE 26

":*

.

¥÷÷÷

= k t
  • ko
.r .
slide-27
SLIDE 27

Summary stats of standard Coordinates/normalized data

slide-28
SLIDE 28

Standard Coordinates/normalized data to μ=0, σ=1, σ2=1

Data in standard coordinates always has

mean = 0; standard deviaAon =1; variance = 1.

Such data is unit-less, plots based on this

someAmes are more comparable

We see such normalizaAon very oren in

staAsAcs

slide-29
SLIDE 29

Additional References

Charles M. Grinstead and J. Laurie Snell

"IntroducAon to Probability”

Morris H. Degroot and Mark J. Schervish

"Probability and StaAsAcs”

slide-30
SLIDE 30

See you next time

See You!