Friday, April 20, 2007

LAB10

Shannon's entropy factors in probability while Hartley does not. Shannon's entropy is basically asking how many yes or no questions does it take to get to the root of the question. It factors in probability unlike Hartley's, though through some research on wikipedia I found that the two are very closely related and have joint theorems (entitled the Shannon-Hartley theorem) which ironically is what I've been studying in my Physics of Sound course, as it relates to the Nyquist theorem, which states how much information could travel through a telegram.

Thursday, April 5, 2007

What I Learned...

There wasn't a whole lot that I learned about linear regression. I have always been a math sort of guy. The first time I played around with linear regression was my freshmen year of high school (algebra 2/trig). This is where I learned that linear regression is a method of seeing "how correlated" the data between the x and y data points, or the dependent and independent variables. There is a function on any TI-83 calculator which will run linear regression for you, including the r and r^2 values, which is how I originally performed the task. When graphing data points the data will rarely line up perfectly linearly. So linear regression tell you the best fit line that runs through the data (aka the slope, y-intercept, and the r value which is basically a percentage fit). R comes out say as .94 which means that the data points match a line with 94% accuracy or fit to the line.
What I did learn from this lab was a lot of about excel . I had never used excel before at least to this extent. It is extremely useful for doing many calculations at once, and I'm sure I'll being using it more in the future solely for convenience. It's very interesting seeing the relationship between two variables, and then having a relatively simple tool and set of equations that will tell you how likely it is that the data relates to each other, because the charts are basically scatter plots, but if the data relates then it will form a positive or negative relationship. It doesn't have to be linear either, there is of course every type of regression such as quadratic regression, exponential regression (probably the most useful out of any of them, in my experiences), and linear regression. Another very useful tool aside from showing there is a relationship is predicting future behavior because of it. If linear regression shows strong correlation you can predict fairly accurately population growths or bacteria growths (probably exponential regression though). For the example in the lab with shoe size in relation to height, you could fairly accurately predict how big the foot of someone who is, say, 7 feet tall.
However, as with any inductive modeling you can never be for certain, past events do not always relate to future events with perfect accuracy, which is why science is full of theories and not facts.

Wednesday, March 7, 2007

Task3












Second Truth Table

A B O1 O2

0 0 1 1

0 1 1 1

1 0 1 1

1 1 0 0


De Morgan’s law is proved true because both the end results are the same, which is true when both are false or when both are true.

Task2


First Truth Table

A B OUTPUT

0 0 1

0 1 0

1 0 0

1 1 1

Conclusion: The circuit always outputs a "true" or positive result (or a "1") when A and B are both the same (0 or 1).

Wednesday, February 21, 2007

Binary Conversions

First, to convert the decimal number 529 to decimal you continually divide the number by 2, and if there is a remainder after each division it represents a "1". The numbers which divide evenly will thus represent a "0" in the binary representation. This is better explained just by showing it, so here is the conversion for 529. (R=remainder). Notice how the right side forms the binary code which is read from bottom up.
529
529/2 = 264 R 1
264/2 = 132 R 0
132/2 = 66 R 0
66/2 = 33 R 0
33/2 = 16 R 1
16/2 = 8 R 0
8/2 = 4 R 0
4/2 = 2 R 0
2/2 = 1 R 0
1/2 = 0 R 1

Thus, the binary code for 529 is 1000010001.


To convert from decimal to binary is a bit more complicated in my opinion, but not very difficult at all once the concept is understood. The binary 110010101 is represented in decimal by multiplying (from right to left) the binary number times 2 to the power of the n-1. For example, there are 9 numbers in this sequence. The numbers are then added together to get the final decimal number. So the first number (the "1" all the way to the right) is multiplied by 2^0. (n=1, so n-1=0). Likewise, the last number "1" (all the way to the left) is multiplied by 2^8 (n=9, so n-1=8), or 258. Below is the long-hand math done for the binary of 110010101.

1*2^0 = 1
0*2^1 = 0
1*2^2 = 4
0*2^3 = 0
1*2^4 = 16
0*2^5 = 0
0*2^6 = 0
1*2^7 = 128
1*2^8 = 258

So, the decimal of 110010101 is (1+0+4+0+16+0+0+128+258) = 405



The difference between a positional and non-positional number system is relatively simple. Positional numbers are numbers which contain a base, normally 10 in the English number system. Which means that there is a specific set of symbols (in our case, 0-9) which, depending on the placement, makes the value greater or lower. For example, we have "places" for each number, "5" alone represents a much lower number than "500" simply because the 5 is in the "hundreds" place in this case.
Non-positional numbers are complex in that you have to understand what each symbol represents in relation to the numbers next to it. There is not a constant multiplier and the position does give the value an increase or decrease. The Roman Numeral System works on this concept. For example XIII is equal to 13. The position the X is in does not give it a specific value other than what it represents which is a 10. The "I's" following only represent 1s.

Wednesday, February 14, 2007

Unix MSDos

I actually remember typing in commands as a kid to get to the games I wanted to play. I would have to type a very exact code in order for the game to come up; obviously before the day of icons. Some important Unix codes I learned that also have Windows/DOS commands.

1) cd is an important command which changes the directory you are currently in and can also move the directory to a folder is /directory is added after it. The MS-DOS command is the same for this particular commadn
2)rm (filename) is used to delete files on the Unix system, the MS-DOS counterpart is listed as del(file name)
3) "who" is used to check who is on the same system you are. Since Unix is an open network of computers which can share and transfer files, one of the first forms of the "internet." who allows me to actually see who is on the same unix system that I am. When I checked this another completely random person appeared, who was not even near the workstation I was at.
4)cal is another useful little feature in which you can view any calender for any year by typing cal (month in #) (year). The MS-DOS version is the same for this I believe, except that you can type out the month such as February instead of "2"