Dictionary
Dictionaries dont keep an ordering as for lists, they do.
Rids of the problem of using multiple lists that are kept the same length
Keys
They are immutable
Values
They can be either immu
Strings
Strings:
-used when calling print / input
-can be operated like numbers ; + and *
-are sequences; use Python index notation to extract its characters
using notation :
s[x] ; s = string and
How to Think Like a Computer
Scientist: Learning with Python 3
Documentation
Release 3rd Edition
Peter Wentworth, Jeffrey Elkner,
Allen B. Downey and Chris Meyers
August 12, 2012
CONTENTS
1
The way of the program
1.1 The Python programming language
1.2 Wh
CSC108 Recipe for Designing Functions
1. Example Write one or two examples of calls to your function1 and the expected returned values. Include an example
of a standard case (as opposed to a tricky or corner case.) Put the examples inside a triple-quoted
STA 441: Methods of Applied
Statistics
STA1008: Applications of
Statistics
This slide show is an open-source document.
See last slide for copyright information.
Data File
Rows are cases
Columns are variables
Variables can be
Quantitative - representing
1. Consider the independent random variables X i ~ N (0,5) (=5) for i=1, 2, 3, 4 and
independent variables Y1 ~ 22 and Y2 ~ 102 . Find the value of k in the following:
a)
b)
c)
d)
2. Consider the independent random variables X i ~ N (0, 4) (=4) for i=1, 2
CSC108 Summer 2016 - Quiz #2 Week 3
Question 1
What is the output of this code? If error, write error and explain why.
x = "APPLE"
x.lower()
print(x) _
y = "mango"
y = y.replace("m","M")
print(y) _
z = "kiwi"
z[1] = "A"
print(z) _
Question 2
What is the v
Chapter 4
More Than One Explanatory
Variable at a Time
The standard elementary tests typically involve one explanatory variable and one response
variable. Now we will see why this can make them very misleading. The lesson you
should take away from this di
STA258H5
Supplementary Exercises #1
1. Tobin's Q is a corporate financial measure. It is defined as
market value of an assest what they'd get if they sell something
Q
cost to replace the asset
what they'd pay to replace the thing
The file tobinQ.csv conta
ECO 358 Financial Economics I
Lecture 7
The Term Project
NPV and IRR Rules
Return vs. Risk
Choice Under Uncertainty (Introduction)
0
The Term Project
The term project will be posted on the course
website by Friday noon.
Due in Class on November 26thh.
University of Toronto, Mississauga
ECO358 Financial Economics I
Fall 2015
Term Project
Total 100 marks
Due: Nov. 26th, 2015, 6pm
NOTE: Hand in in-class. Late assignments will be subject to a penalty of 20% per day.
1. The manager of XYZ company is conside
Midterm Test Solutions
Question 1.
Fall 2014
[5 marks]
Beside each code fragment in the table below, write what is printed. If the code would cause an error,
write ERROR and give a brief explanation.
tweet1 = #uoft_cs Turing award winner Steve Cook
tweet2
STA258H5
Supplementary Exercises #2
1. Simulate 1000 sample means, where each sample mean is the average of 10 U(2,4)
observations.
a. Plot an approximate density
b. Plot a QQ plot.
c. Does it appear that these sample means could have a normal distributio
Regression Analysis - Unequal Variances
STA 302H5: Regression Analysis
November 6, 2016
Regression Analysis (STA 302)
Regression Analysis - Unequal Variances
November 6, 2016
1 / 18
Introduction
One of the great values of the Gauss-Markov theorem is that
The Economics of Foreign Exchange
and Global Finance
Peijie Wang
The Economics
of Foreign Exchange
and Global Finance
With 71 Figures and 75 Tables
12
Professor Peijie Wang
Business School
University of Hull
Cottingham Road
Hull HU6 7RX
United Kingdom
p.w
Sample Trade
Emerald Corporation is a mid sized US company which manufactures
high quality pet foods. Emerald Corp produces cat and dog food with all
natural ingerdients with a minimum seventy-five pecent organic content. The
company has experienced stron
Chapter 5
Multiple Regression
5.1
Three Meanings of Control
In this course, we will use the word control to refer to procedures designed to reduce
the influence of extraneous variables on our results. The definition of extraneous is not
properly part of a
DEPARTMENT OF ECONOMICS
UNIVERSITY OF TORONTO AT MISSISSAUGA
Money, Banking & Financial Markets
ECO349H5S (LEC0101)
WINTER 2016
TUESDAY 3 5 IN CC1140
Prof. ANGELO MELINO
OFFICE:
OFFICE HOURS:
E-MAIL:
KN 3254
TUESDAY 1:00 2:00 or by appt
[email protected]
Lecture 1: INTRODUCTION TO SOCIOLOGY
Sociology: The social study of human behaviour in a social context.
It helps to inform about social structures, behaviour, culture, etc.
It helps to dispel myths using empirical evidence.
eg: People on welfare live off
What is Communication?
"Overcoming of natural barriers to facilitate the movement of people, goods and
culture." - A. Mattelart
What is Technology?
"Technology is a repeatable social, cultural and material process." - J. Sterne
What is Media?
"Technologie
Regression Analysis - Tests and Confidence Regions
STA 302H5: Regression Analysis
October 14, 2016
Regression Analysis (STA 302)
Regression Analysis - Tests and Confidence Regions
October 14, 2016
1 / 20
Introduction
Consider the example of house prices t
Regression Analysis - Indicator Variable
STA 302H5: Regression Analysis
October 23, 2016
Regression Analysis (STA 302)
Regression Analysis - Indicator Variable
October 23, 2016
1 / 14
Introduction
Indicator or dummy variables are variables that take only
Regression Analysis - The Normality Assumption
STA 302H5: Regression Analysis
October 30, 2016
Regression Analysis (STA 302)
Regression Analysis - The Normality Assumption
October 30, 2016
1 / 12
Introduction
In much of the work presented in the last fou
Fall 20l3
Midterm Test Solutions
Question 1.
[4 marks]
Part (a) [2 marks] In the table below are 4 calls to the function returns_what. Beside each call, write
the returned value and its type.
def returns_what(x):
(int) -> object
Call
Return Value
returns